Skip to content

Commit

Permalink
Make gui/notes respect the global search settings
Browse files Browse the repository at this point in the history
  • Loading branch information
wiktor-obrebski committed Sep 19, 2024
1 parent 1998f76 commit aff2ab8
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions gui/notes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@

local gui = require 'gui'
local widgets = require 'gui.widgets'
local guidm = require('gui.dwarfmode')
local guidm = require 'gui.dwarfmode'
local script = require 'gui.script'
local overlay = require 'plugins.overlay'
local utils = require 'utils'

local text_editor = reqscript('internal/journal/text_editor')
local note_manager = reqscript('internal/notes/note_manager')

Expand Down Expand Up @@ -228,10 +230,9 @@ function NotesWindow:loadFilteredNotes(search_phrase, force)
return
end

local point_name_lowercase = map_point.name:lower()
if (
point_name_lowercase ~= nil and #point_name_lowercase > 0 and
point_name_lowercase:find(search_phrase)
#map_point.name > 0 and
utils.search_text(map_point.name, search_phrase)
) then
table.insert(choices, {
text=map_point.name,
Expand Down

0 comments on commit aff2ab8

Please sign in to comment.