Fix 'O' not putting the cursor on the correct line

This commit is contained in:
Maxime Coste 2018-03-27 07:28:25 +11:00
parent 253790be51
commit 3d3a37a80c
4 changed files with 9 additions and 1 deletions

View File

@ -1365,7 +1365,7 @@ private:
buffer.insert(sel.min().line + inserted_count, buffer.insert(sel.min().line + inserted_count,
String{'\n', CharCount{count}}); String{'\n', CharCount{count}});
for (int i = 0; i < count; ++i) for (int i = 0; i < count; ++i)
new_sels.push_back({sel.max().line + inserted_count + i}); new_sels.push_back({sel.min().line + inserted_count + i});
inserted_count += count; inserted_count += count;
} }
selections.set(std::move(new_sels), selections.set(std::move(new_sels),

View File

@ -0,0 +1 @@
Oqux<esc>

View File

@ -0,0 +1,3 @@
%(foo
bar
baz)

View File

@ -0,0 +1,4 @@
qux
foo
bar
baz