Skip to content

Commit

Permalink
enh: add info about selected range
Browse files Browse the repository at this point in the history
  • Loading branch information
Artawower committed Dec 7, 2023
1 parent 21fb5d7 commit 158524c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion file-info.el
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
;; Author: Artur Yaroshenko <[email protected]>
;; URL: https://github.com/artawower/file-info.el
;; Package-Requires: ((emacs "28.1") (hydra "0.15.0") (browse-at-remote "0.15.0"))
;; Version: 0.6.2
;; Version: 0.7.0

;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -187,6 +187,11 @@
(:handler
(file-info--get-headline "Analytics")
:face font-lock-comment-face)
(:name
"Selection range"
:bind "A"
:handler (when (use-region-p) (format "%s-%s (%s)" (line-number-at-pos (region-beginning)) (line-number-at-pos (region-end)) (count-lines (region-beginning) (region-end))))
:face font-lock-number-face)
(:name
"Line count"
:handler (format "%s/%s" (line-number-at-pos) (count-lines (point-min) (point-max)))
Expand Down

0 comments on commit 158524c

Please sign in to comment.