From 820f69597c8501bfaddabe52fd00f42cea008cd3 Mon Sep 17 00:00:00 2001 From: 10sr <8.slashes@gmail.com> Date: Fri, 28 Sep 2018 17:51:10 +0900 Subject: [PATCH] Add narrowed indicator --- emacs.el | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/emacs.el b/emacs.el index a1c4105..6704bb0 100644 --- a/emacs.el +++ b/emacs.el @@ -425,9 +425,13 @@ found, otherwise returns nil." (column-number-mode 0) (size-indication-mode 0) (setq mode-line-position - '(:eval (format "L%%l/%d:C%%c" + '(:eval (format "L%%l/%d%s:C%%c" (count-lines (point-max) - (point-min))))) + (point-min)) + (if (buffer-narrowed-p) + "[N]" + "") + ))) ;; http://www.geocities.jp/simizu_daisuke/bunkei-meadow.html#frame-title