diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2013-12-14 14:17:02 +0000 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2013-12-14 14:38:17 +0000 |
| commit | 6afef079b6104666e524dbae99592efc9c1b8136 (patch) | |
| tree | d6e95356477f478403b0ba8603b53b705a22cb37 /src/normal.cc | |
| parent | eced7d4c246c007f9617d91edd5867e9e002bfc1 (diff) | |
Remove Editor::main_selection(|index), directly use the SelectionList method
Diffstat (limited to 'src/normal.cc')
| -rw-r--r-- | src/normal.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/normal.cc b/src/normal.cc index 219df354..e2bfbe03 100644 --- a/src/normal.cc +++ b/src/normal.cc @@ -189,7 +189,7 @@ void goto_commands(Context& context, int line) } case 'f': { - const Range& sel = context.editor().main_selection(); + const Range& sel = context.editor().selections().main(); const Buffer& buffer = context.buffer(); String filename = content(buffer, sel); static constexpr char forbidden[] = { '\'', '\\', '\0' }; @@ -958,7 +958,7 @@ void align_indent(Context& context, int selection) if (selection > selections.size()) throw runtime_error("invalid selection index"); if (selection == 0) - selection = editor.main_selection_index() + 1; + selection = editor.selections().main_index() + 1; const String& line = buffer[selections[selection-1].min().line]; auto it = line.begin(); |
