GNU bug report logs -
#9810
cw in viper mode clobbers clipboard
Previous Next
Full log
View this message in rfc822 format
On Fri, Oct 28, 2011 at 11:37 PM, Chong Yidong <cyd <at> gnu.org> wrote:
> Bob Nnamtrop <bobnnamtrop <at> gmail.com> writes:
>
>> I do not consider the selected word when one does 'cw' an active
>> region (in the usual emacs sense). It is a vi construct independent of
>> emacs active regions and so it need not honor the
>> select-active-regions setting.
>
> Could you test the following patch and see if it does what you expect?
>
> === modified file 'lisp/emulation/viper-cmd.el'
> *** lisp/emulation/viper-cmd.el 2011-07-09 19:32:42 +0000
> --- lisp/emulation/viper-cmd.el 2011-10-29 05:36:10 +0000
> ***************
> *** 1387,1393 ****
> (insert " ")(backward-char 1)))
> (if (= viper-com-point (point))
> (viper-forward-char-carefully))
> ! (set-mark viper-com-point)
> (if (eq m-com 'viper-next-line-at-bol)
> (viper-enlarge-region (mark t) (point)))
> (if (< (point) (mark t))
> --- 1387,1393 ----
> (insert " ")(backward-char 1)))
> (if (= viper-com-point (point))
> (viper-forward-char-carefully))
> ! (push-mark viper-com-point t)
> (if (eq m-com 'viper-next-line-at-bol)
> (viper-enlarge-region (mark t) (point)))
> (if (< (point) (mark t))
> ***************
> *** 1396,1403 ****
> (viper-backward-char-carefully)) ; give back the newline
> (if (eq viper-intermediate-command 'viper-repeat)
> (viper-change-subr (mark t) (point))
> ! (viper-change (mark t) (point))
> ! ))
>
> ;; this is invoked by viper-substitute-line
> (defun viper-exec-Change (m-com com)
> --- 1396,1403 ----
> (viper-backward-char-carefully)) ; give back the newline
> (if (eq viper-intermediate-command 'viper-repeat)
> (viper-change-subr (mark t) (point))
> ! (viper-change (mark t) (point)))
> ! (viper-deactivate-mark))
>
> ;; this is invoked by viper-substitute-line
> (defun viper-exec-Change (m-com com)
>
>
Yes, it makes cw work the way I expect even if select-active-regions is t.
Thanks,
Bob
This bug report was last modified 13 years and 293 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.