Skip to content

Commit

Permalink
fix(notes): fix previous/next commands
Browse files Browse the repository at this point in the history
Apparently the pattern means something, so I am using the type instead.
  • Loading branch information
arsham committed May 12, 2022
1 parent 0e56536 commit 416825d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lua/listish/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ local function insert_list(items, is_local) --{{{
end
end --}}}

local unique_id = "ADDED BY LISTISH PLUGIN"
local unique_id = "Z"

---Inserts the current position of the cursor in the qf/local list.
-- @param note string
Expand All @@ -81,7 +81,7 @@ local function insert_note_to_list(note, is_local) --{{{
lnum = location[1],
col = location[2] + 1,
text = note,
pattern = unique_id,
type = unique_id,
}
insert_list({ item }, is_local)
end
Expand All @@ -99,7 +99,7 @@ end
local function filter_listish_items(cur_list)
local new_list = {}
for _, item in ipairs(cur_list) do
if item.pattern ~= unique_id then
if item.type ~= unique_id then
table.insert(new_list, item)
end
end
Expand Down

0 comments on commit 416825d

Please sign in to comment.