From a5c68a8053b7b19919af9eeff10a2f9c67a597cf Mon Sep 17 00:00:00 2001 From: Tor Hveem Date: Mon, 21 Jul 2014 15:55:50 +0200 Subject: [PATCH] fix keybindings relying on caretPos --- js/glowingbear.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/js/glowingbear.js b/js/glowingbear.js index fcae26b..7a74d61 100644 --- a/js/glowingbear.js +++ b/js/glowingbear.js @@ -1524,6 +1524,8 @@ weechat.directive('inputBar', function() { } // Some readline keybindings if ($event.ctrlKey && !$event.altKey && !$event.shiftKey && document.activeElement === inputNode) { + // get current caret position + var caretPos = inputNode.selectionStart; // Ctrl-a if (code == 65) { inputNode.setSelectionRange(0, 0);