358 |
'viper-insertion-ring)) |
'viper-insertion-ring)) |
359 |
|
|
360 |
(if viper-ESC-moves-cursor-back |
(if viper-ESC-moves-cursor-back |
361 |
(or (bolp) (backward-char 1)))) |
(or (bolp) (viper-beginning-of-field) (backward-char 1)))) |
362 |
)) |
)) |
363 |
|
|
364 |
;; insert or replace |
;; insert or replace |
1996 |
;;; Minibuffer business |
;;; Minibuffer business |
1997 |
|
|
1998 |
(defsubst viper-set-minibuffer-style () |
(defsubst viper-set-minibuffer-style () |
1999 |
(add-hook 'minibuffer-setup-hook 'viper-minibuffer-setup-sentinel)) |
(add-hook 'minibuffer-setup-hook 'viper-minibuffer-setup-sentinel) |
2000 |
|
(add-hook 'post-command-hook 'viper-minibuffer-post-command-hook)) |
2001 |
|
|
2002 |
|
|
2003 |
(defun viper-minibuffer-setup-sentinel () |
(defun viper-minibuffer-setup-sentinel () |
2040 |
(minibuffer-prompt-end) |
(minibuffer-prompt-end) |
2041 |
(point-min))) |
(point-min))) |
2042 |
|
|
2043 |
|
(defun viper-minibuffer-post-command-hook() |
2044 |
|
(when (active-minibuffer-window) |
2045 |
|
(when (< (point) (viper-minibuffer-real-start)) |
2046 |
|
(goto-char (viper-minibuffer-real-start))))) |
2047 |
|
|
2048 |
|
|
2049 |
;; Interpret last event in the local map first; if fails, use exit-minibuffer. |
;; Interpret last event in the local map first; if fails, use exit-minibuffer. |
2050 |
;; Run viper-minibuffer-exit-hook before exiting. |
;; Run viper-minibuffer-exit-hook before exiting. |
2576 |
;; last line of buffer when this line has no \n. |
;; last line of buffer when this line has no \n. |
2577 |
(viper-add-newline-at-eob-if-necessary) |
(viper-add-newline-at-eob-if-necessary) |
2578 |
(viper-execute-com 'viper-line val com)) |
(viper-execute-com 'viper-line val com)) |
2579 |
(if (and (eobp) (not (bobp))) (forward-line -1)) |
(if (and (eobp) (bolp) (not (bobp))) (forward-line -1)) |
2580 |
) |
) |
2581 |
|
|
2582 |
(defun viper-yank-line (arg) |
(defun viper-yank-line (arg) |