giving a count to paste selects which selections yank buffer to use
3p will paste using the yank buffer of the third selection instead of each selection using it's own.
This commit is contained in:
parent
0352ad7983
commit
333b470dd2
17
src/main.cc
17
src/main.cc
|
@ -863,10 +863,21 @@ void do_change(Editor& editor, int count)
|
||||||
template<bool append>
|
template<bool append>
|
||||||
void do_paste(Editor& editor, int count)
|
void do_paste(Editor& editor, int count)
|
||||||
{
|
{
|
||||||
if (append)
|
Register& reg = RegisterManager::instance()['"'];
|
||||||
editor.append(RegisterManager::instance()['"']);
|
if (count == 0)
|
||||||
|
{
|
||||||
|
if (append)
|
||||||
|
editor.append(reg);
|
||||||
|
else
|
||||||
|
editor.insert(reg);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
editor.insert(RegisterManager::instance()['"']);
|
{
|
||||||
|
if (append)
|
||||||
|
editor.append(reg.get(count-1));
|
||||||
|
else
|
||||||
|
editor.insert(reg.get(count-1));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void do_select_regex(Editor& editor, int count)
|
void do_select_regex(Editor& editor, int count)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user