Skip to content

Commit 7459c3b

Browse files
committed
[emacs] github-url: fix end line resolution
evil-mode kinda messes up the line computation. This fixes that. Previously we always used to decrease the line once computed, but this caused problems if we did char based selection instead of a line based selection.
1 parent d7d8f1e commit 7459c3b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • emacs/.config/emacs/lisp

emacs/.config/emacs/lisp/web.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ If region is active, link covers the region."
6464
(unless (equal major-mode 'dired-mode)
6565
(if (use-region-p)
6666
(let* ((start (line-number-at-pos (region-beginning)))
67-
(end (1- (line-number-at-pos (region-end)))))
67+
(end (line-number-at-pos (1- (region-end)))))
6868
(if (= start end)
6969
(format "#L%s" start)
7070
(format "#L%s-L%s" start end)))

0 commit comments

Comments
 (0)