From e3f89438582c12b4d058dd7752c294ad6bb33fac Mon Sep 17 00:00:00 2001 From: Thomas Buckley-Houston Date: Wed, 11 May 2022 11:05:49 -0300 Subject: Default to xterm-mode selection This allows snippet plugins to do their magic tabbed selection of positions to fill in a snippet. For example when you want to complete an `if~`, snippet plugins populate the buffer at that cursor position with a skeleton of an `if` statement and select the parts that you want to customise yourself. This is only possible if the default selection mode is xterm. So in this commit we carefully manage using mswin-style selection when the user initiates it with SHIFT keys etc. The only downside is that I haven't found a way to detect when mouse selection starts in order to move it away from xterm selection to mswin sselection. --- spec/novim_mode_spec.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'spec') diff --git a/spec/novim_mode_spec.rb b/spec/novim_mode_spec.rb index 1d0bc99..c784772 100644 --- a/spec/novim_mode_spec.rb +++ b/spec/novim_mode_spec.rb @@ -56,7 +56,8 @@ end describe 'Selecting' do specify 'select all and replace' do initial <<-EOF - select me + select me more, just to make sure + even a hard line EOF type 'gone' @@ -203,7 +204,7 @@ describe 'Wrapped text' do type '!' final <<-EOF - line1 !line3 line4 + line1 !line4 EOF end @@ -216,7 +217,7 @@ describe 'Wrapped text' do type '!' final <<-EOF - line1 !line3 line4 + !line3 line4 EOF end -- cgit v1.2.3-70-g09d2