Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/vim.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ export function initVim(CM) {
{ keys: 'J', type: 'action', action: 'joinLines', isEdit: true },
{ keys: 'gJ', type: 'action', action: 'joinLines', actionArgs: { keepSpaces: true }, isEdit: true },
{ keys: 'p', type: 'action', action: 'paste', isEdit: true, actionArgs: { after: true, isEdit: true }},
{ keys: 'P', type: 'action', action: 'paste', isEdit: true, actionArgs: { after: false, isEdit: true }},
{ keys: 'P', type: 'action', action: 'paste', isEdit: true, actionArgs: { after: false, isEdit: true, updateUnnamedRegister: false }},
{ keys: 'r<character>', type: 'action', action: 'replace', isEdit: true },
{ keys: '@<register>', type: 'action', action: 'replayMacro' },
{ keys: 'q<register>', type: 'action', action: 'enterMacroRecordMode' },
Expand Down Expand Up @@ -3333,7 +3333,9 @@ export function initVim(CM) {
lastSelectionCurEnd = vim.lastSelection.headMark.find();
}
// push the previously selected text to unnamed register
vimGlobalState.registerController.unnamedRegister.setText(selectedText);
if (actionArgs.updateUnnamedRegister !== false) {
vimGlobalState.registerController.unnamedRegister.setText(selectedText);
}
if (blockwise) {
// first delete the selected text
cm.replaceSelections(emptyStrings);
Expand Down