Let the middle button pasting respect newlines by default.

This makes it in sync with the new default for Edit > Paste operation.
https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg222233.html
This commit is contained in:
Pavel Sanda 2024-06-24 22:29:23 +02:00
parent 740d863f61
commit fe9573ee8b
2 changed files with 7 additions and 3 deletions

View File

@ -3655,8 +3655,12 @@ void LyXAction::init()
/*! /*!
* \var lyx::FuncCode lyx::LFUN_SELECTION_PASTE * \var lyx::FuncCode lyx::LFUN_SELECTION_PASTE
* \li Action: Pastes the internal selection text in permanent selection. * \li Action: Pastes the internal selection text in permanent selection.
* \li Notion: Created in order to have middle mouse button pasting correct (bound to * \li Notion: Created in order to have middle mouse button pasting correct. The middle
command-alternatives selection-paste ; primary-selection-paste paragraph). button is bound to "command-alternatives selection-paste ; primary-selection-paste".
selection-paste makes sure that if something is highlighted in LyX window
it gets into selection buffer and pasted. If nothing is highlighted, then
primary-selection-paste covers the cases of pasting from selection
buffer from another apps (or from LyX once the highlight is gone).
* \li Syntax: selection-paste * \li Syntax: selection-paste
* \li Origin: lasgouttes, 14 Jan 2009 * \li Origin: lasgouttes, 14 Jan 2009
* \endvar * \endvar

View File

@ -5279,7 +5279,7 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
bv->mouseSetCursor(cur); bv->mouseSetCursor(cur);
lyx::dispatch( lyx::dispatch(
FuncRequest(LFUN_COMMAND_ALTERNATIVES, FuncRequest(LFUN_COMMAND_ALTERNATIVES,
"selection-paste ; primary-selection-paste paragraph")); "selection-paste ; primary-selection-paste"));
} }
cur.noScreenUpdate(); cur.noScreenUpdate();
break; break;