Frank Fischer  committed 23ef27e

show warning if 'windmove' is not available

  • Participants
  • Parent commits 86ba391
  • Branches default

Comments (0)

Files changed (2)

File vim-scroll.el

 ;; operations are usually just simple commands and should not be
 ;; repeatable but should keep visual mode.
-;;; TODO:
-;;  - dependency on windmove may force an error
 ;;; Code:
 (provide 'vim-scroll)
-(require 'windmove)
 (defun vim:num-visible-lines ()
   "Returns the number of currently visible lines."
   (- (window-height) 1))

File vim-window.el

 (provide 'vim-window)
+(condition-case nil
+    (require 'windmove)
+  (error
+   (message "vim-mode: Could not load 'windmove', window-commands not available.")
+   nil))
 (defun vim:resize-window (new-size &optional horizontal)   
   "Sets the current window's with or height to `new-size'."