GNU bug report logs - #9810
cw in viper mode clobbers clipboard

Previous Next

Package: emacs;

Reported by: Bob Nnamtrop <bobnnamtrop <at> gmail.com>

Date: Thu, 20 Oct 2011 16:20:02 UTC

Severity: normal

Done: Chong Yidong <cyd <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Chong Yidong <cyd <at> gnu.org>
To: Bob Nnamtrop <bobnnamtrop <at> gmail.com>
Cc: Stefan Monnier <monnier <at> iro.umontreal.ca>, 9810 <at> debbugs.gnu.org
Subject: bug#9810: cw in viper mode clobbers clipboard
Date: Sat, 29 Oct 2011 13:37:10 +0800
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)





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.