From 27ec4460553aa8f471850dd66b489f618978b344 Mon Sep 17 00:00:00 2001 From: Marijn Haverbeke Date: Fri, 20 Dec 2019 09:46:00 +0100 Subject: [PATCH] [sublime bindings] Make by-sub-word motion more conformant to Sublime Closes #6091 --- keymap/sublime.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/keymap/sublime.js b/keymap/sublime.js index 99c8beea08..5aeab9c99d 100644 --- a/keymap/sublime.js +++ b/keymap/sublime.js @@ -32,7 +32,10 @@ } else if (state == "in") { if (type != cat) { if (type == "w" && cat == "W" && dir < 0) pos--; - if (type == "W" && cat == "w" && dir > 0) { type = "w"; continue; } + if (type == "W" && cat == "w" && dir > 0) { // From uppercase to lowercase + if (pos == start.ch + 1) { type = "w"; continue; } + else pos--; + } break; } }