Dear all,
This patch al last unify internal and external pasting. With with patch,
when you press Ctrl-v, LyX will invoke LFUN_PASTE if the clipboard was
set internally and "LFUN_CLIPBOARD_PASTE line" if set externally. The
later default can be changed to "paragraph" in the binding.
Objection?
Abdel.
Index: lib/bind/aqua.bind
===================================================================
--- lib/bind/aqua.bind (revision 16460)
+++ lib/bind/aqua.bind (working copy)
@@ -72,7 +72,7 @@
\bind "M-~S-e u" "undo"
\bind "M-~S-e d" "redo"
\bind "M-~S-e c" "cut"
-\bind "M-~S-e a" "paste"
+\bind "M-~S-e a" "clipboard-paste"
\bind "M-~S-e f" "find-replace"
\bind "M-~S-e s" "spellchecker"
\bind "M-~S-e h" "buffer-chktex"
Index: lib/bind/cua.bind
===================================================================
--- lib/bind/cua.bind (revision 16460)
+++ lib/bind/cua.bind (working copy)
@@ -67,7 +67,7 @@
\bind "C-c" "copy"
\bind "C-x" "cut"
-\bind "C-v" "paste"
+\bind "C-v" "clipboard-paste"
\bind "C-M-v" "primary-selection-paste"
\bind "C-S-v" "primary-selection-paste paragraph"
@@ -134,7 +134,7 @@
\bind "S-C-Home" "buffer-begin-select"
\bind "S-C-End" "buffer-end-select"
\bind "C-Insert" "copy"
-\bind "S-Insert" "paste"
+\bind "S-Insert" "clipboard-paste"
\bind "S-Delete" "cut"
# Numeric keypad (if Shift+KP_XXX does not switch the NumLock state)
@@ -155,7 +155,7 @@
\bind "S-C-KP_Prior" "buffer-begin-select"
\bind "S-C-KP_Next" "buffer-end-select"
\bind "C-KP_Insert" "copy"
-\bind "S-KP_Insert" "paste"
+\bind "S-KP_Insert" "clipboard-paste"
\bind "S-KP_Delete" "cut"
#
Index: lib/bind/mac.bind
===================================================================
--- lib/bind/mac.bind (revision 16460)
+++ lib/bind/mac.bind (working copy)
@@ -57,7 +57,7 @@
\bind "C-c" "copy"
\bind "C-x" "cut"
-\bind "C-v" "paste"
+\bind "C-v" "clipboard-paste"
\bind "C-M-v" "primary-selection-paste"
\bind "C-S-v" "primary-selection-paste paragraph"
@@ -121,7 +121,7 @@
\bind "S-C-Up" "buffer-begin-select"
\bind "S-C-Down" "buffer-end-select"
\bind "C-Insert" "copy"
-\bind "S-Insert" "paste"
+\bind "S-Insert" "clipboard-paste"
\bind "S-Delete" "cut"
# Numeric keypad (if Shift+KP_XXX does not switch the NumLock state)
@@ -142,7 +142,7 @@
\bind "S-C-KP_Prior" "buffer-begin-select"
\bind "S-C-KP_Next" "buffer-end-select"
\bind "C-KP_Insert" "copy"
-\bind "S-KP_Insert" "paste"
+\bind "S-KP_Insert" "clipboard-paste"
\bind "S-KP_Delete" "cut"
#
Index: lib/bind/sciword.bind
===================================================================
--- lib/bind/sciword.bind (revision 16460)
+++ lib/bind/sciword.bind (working copy)
@@ -104,7 +104,7 @@
\bind "C-t" "math-mode"
\bind "C-u" "font-underline"
-\bind "C-v" "paste"
+\bind "C-v" "clipboard-paste"
\bind "C-M-v" "primary-selection-paste"
\bind "C-S-v" "primary-selection-paste paragraph"
\bind "C-w" "buffer-close"
@@ -235,7 +235,7 @@
\bind "S-C-KP_Prior" "buffer-begin-select"
\bind "S-C-KP_Next" "buffer-end-select"
\bind "C-KP_Insert" "copy"
-\bind "S-KP_Insert" "paste"
+\bind "S-KP_Insert" "clipboard-paste"
\bind "S-KP_Delete" "cut"
Index: src/insets/insettabular.C
===================================================================
--- src/insets/insettabular.C (revision 16460)
+++ src/insets/insettabular.C (working copy)
@@ -706,6 +706,10 @@
break;
case LFUN_CLIPBOARD_PASTE:
+ if (theClipboard().isInternal()) {
+ cell(cur.idx())->dispatch(cur, FuncRequest(LFUN_PASTE));
+ break;
+ }
case LFUN_PRIMARY_SELECTION_PASTE: {
docstring const clip = (cmd.action == LFUN_CLIPBOARD_PASTE) ?
theClipboard().get() :
Index: src/text3.C
===================================================================
--- src/text3.C (revision 16475)
+++ src/text3.C (working copy)
@@ -861,6 +861,10 @@
}
case LFUN_CLIPBOARD_PASTE:
+ if (theClipboard().isInternal()) {
+ lyx::dispatch(FuncRequest(LFUN_PASTE));
+ break;
+ }
pasteString(cur, theClipboard().get(), cmd.argument());
break;