From 02c91ddda056cb82e5704fcfefc14e7bddea79ea Mon Sep 17 00:00:00 2001 From: nosami Date: Thu, 16 Mar 2017 01:15:09 +0000 Subject: [PATCH] Fix df,dt, cf & ct - fixes #3 --- XSVim/Properties/AddinInfo.fs | 2 +- XSVim/XSVim.fs | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/XSVim/Properties/AddinInfo.fs b/XSVim/Properties/AddinInfo.fs index e28ee5a..75d16dd 100644 --- a/XSVim/Properties/AddinInfo.fs +++ b/XSVim/Properties/AddinInfo.fs @@ -7,7 +7,7 @@ open Mono.Addins.Description [] [] diff --git a/XSVim/XSVim.fs b/XSVim/XSVim.fs index 361ce5d..4827810 100644 --- a/XSVim/XSVim.fs +++ b/XSVim/XSVim.fs @@ -324,7 +324,9 @@ module Vim = let delete start finish = let finish = match command.textObject with - | ForwardToEndOfWord -> finish + 1 + | ForwardToEndOfWord + | ToCharInclusive _ + | ToCharExclusive _ -> finish + 1 | _ -> finish if command.textObject <> Selection then setSelection vimState editor command start finish @@ -347,8 +349,10 @@ module Vim = | Change -> delete start finish | Yank -> let finish = - match command.textObject with - | ForwardToEndOfWord -> finish + 1 + match command.textObject with + | ForwardToEndOfWord + | ToCharInclusive _ + | ToCharExclusive _ -> finish + 1 | _ -> finish if command.textObject <> Selection then setSelection vimState editor command start finish