1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-12-23 19:46:33 +03:00

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:
Maxime Coste 2012-02-10 14:00:21 +00:00
parent 0352ad7983
commit 333b470dd2

View File

@ -862,11 +862,22 @@ void do_change(Editor& editor, int count)
template<bool append>
void do_paste(Editor& editor, int count)
{
Register& reg = RegisterManager::instance()['"'];
if (count == 0)
{
if (append)
editor.append(RegisterManager::instance()['"']);
editor.append(reg);
else
editor.insert(RegisterManager::instance()['"']);
editor.insert(reg);
}
else
{
if (append)
editor.append(reg.get(count-1));
else
editor.insert(reg.get(count-1));
}
}
void do_select_regex(Editor& editor, int count)