diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2014-10-03 13:39:13 +0100 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2014-10-03 13:39:13 +0100 |
| commit | d4a84125ef4d23f2c3e0b2eed5f6efbdc88af141 (patch) | |
| tree | 7bb1f1a86b3361c8bae8c2ae0b400da7a856d514 /src/normal.cc | |
| parent | fc53a80395d569d94bd98e3aa3cdc3baf7baea4d (diff) | |
Use InternedStrings for buffer contents
Diffstat (limited to 'src/normal.cc')
| -rw-r--r-- | src/normal.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/normal.cc b/src/normal.cc index 9b6ea48e..fbd23ae8 100644 --- a/src/normal.cc +++ b/src/normal.cc @@ -804,7 +804,7 @@ void deindent(Context& context, int) for (auto line = sel.min().line; line < sel.max().line+1; ++line) { CharCount width = 0; - auto& content = buffer[line]; + auto content = buffer[line]; for (auto column = 0_byte; column < content.length(); ++column) { const char c = content[column]; @@ -1105,7 +1105,7 @@ void copy_indent(Context& context, int selection) selection = context.selections().main_index() + 1; auto ref_line = selections[selection-1].min().line; - const String& line = buffer[ref_line]; + auto line = buffer[ref_line]; auto it = line.begin(); while (it != line.end() and is_horizontal_blank(*it)) ++it; @@ -1117,7 +1117,7 @@ void copy_indent(Context& context, int selection) if (l == ref_line) continue; - auto& line = buffer[l]; + auto line = buffer[l]; ByteCount i = 0; while (i < line.length() and is_horizontal_blank(line[i])) ++i; |
