File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -324,13 +324,18 @@ def bs(self, delete_tabs=True):
324324
325325 def bs_word (self ):
326326 pos = len (self .s ) - self .cpos - 1
327+ deleted = []
327328# First we delete any space to the left of the cursor.
328329 while pos >= 0 and self .s [pos ] == ' ' :
330+ deleted .append (self .s [pos ])
329331 pos -= self .bs ()
330332# Then we delete a full word.
331333 while pos >= 0 and self .s [pos ] != ' ' :
334+ deleted .append (self .s [pos ])
332335 pos -= self .bs ()
333336
337+ return '' .join (reversed (deleted ))
338+
334339 def check (self ):
335340 """Check if paste mode should still be active and, if not, deactivate
336341 it and force syntax highlighting."""
@@ -823,7 +828,7 @@ def p_key(self, key):
823828 return ''
824829
825830 elif key in key_dispatch [config .clear_word_key ]:
826- self .bs_word ()
831+ self .cut_buffer = self . bs_word ()
827832 self .complete ()
828833 return ''
829834
You can’t perform that action at this time.
0 commit comments