Fix nil error in +ivy/jump-list for empty buffers
For empty buffers which don't have any lines, `(thing-at-point 'line)` will return `nil`. This broke `+ivy/jump-list`.
This commit is contained in:
parent
95c3682716
commit
31b2a5a19e
1 changed files with 1 additions and 1 deletions
|
@ -513,7 +513,7 @@ If ALL-FILES-P, search compressed and hidden files as well."
|
|||
(cons (format "%s:%d: %s"
|
||||
(buffer-name)
|
||||
(line-number-at-pos)
|
||||
(string-trim-right (thing-at-point 'line)))
|
||||
(string-trim-right (or (thing-at-point 'line) "<EMPTY BUFFER>")))
|
||||
(point-marker)))))))
|
||||
(cddr (better-jumper-jump-list-struct-ring
|
||||
(better-jumper-get-jumps (better-jumper--get-current-context))))))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue