Skip to content

Commit

Permalink
Merge pull request #99 from jghauser/fix-ref-popup
Browse files Browse the repository at this point in the history
Fix ref popup
  • Loading branch information
jghauser authored Oct 13, 2024
2 parents 16983a7 + 9627cb4 commit 71a35cc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion doc/papis.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*papis.txt* For NVIM v0.8.0 Last change: 2024 September 12
*papis.txt* For NVIM v0.8.0 Last change: 2024 October 13

==============================================================================
Table of Contents *papis-table-of-contents*
Expand Down
2 changes: 1 addition & 1 deletion lua/papis/at-cursor/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ local function get_ref_under_cursor()
local line_until_cursor = current_line:sub(1, cursor_col)
local word_start_col = line_until_cursor:find("[^%s,;]*$") or 1
local line_after_cursor = current_line:sub(cursor_col)
local word_end_col = cursor_col + (line_after_cursor:find("[%s,;]") or #line_after_cursor) - 1
local word_end_col = cursor_col + (line_after_cursor:find("[%s,;%]]") or #line_after_cursor) - 1

-- Extract the word
local ref = current_line:sub(word_start_col, word_end_col)
Expand Down

0 comments on commit 71a35cc

Please sign in to comment.