[core] fix narrow to indirect buffer from visual mode

This commit is contained in:
Keith Pinson 2020-10-26 08:50:50 -04:00 committed by duianto
parent 603d7fbe0b
commit 5b4b6af8d3
1 changed files with 6 additions and 0 deletions

View File

@ -1730,18 +1730,24 @@ Decision is based on `dotspacemacs-line-numbers'."
(defun spacemacs/narrow-to-defun-indirect-buffer ()
(interactive)
(deactivate-mark)
(call-interactively 'clone-indirect-buffer)
(activate-mark)
(call-interactively 'narrow-to-defun)
(message "Function narrowed to an indirect buffer"))
(defun spacemacs/narrow-to-page-indirect-buffer ()
(interactive)
(deactivate-mark)
(call-interactively 'clone-indirect-buffer)
(activate-mark)
(call-interactively 'narrow-to-page)
(message "Page narrowed to an indirect buffer"))
(defun spacemacs/narrow-to-region-indirect-buffer ()
(interactive)
(deactivate-mark)
(call-interactively 'clone-indirect-buffer)
(activate-mark)
(call-interactively 'narrow-to-region)
(message "Region narrowed to an indirect buffer"))