Apply again 1976facaf1
Use reverse search for `find-replace:previous-find`
This commit is contained in:
parent
d7b6fe3d42
commit
cd2adb4a30
|
@ -7,8 +7,7 @@ local DocView = require "core.docview"
|
||||||
local CommandView = require "core.commandview"
|
local CommandView = require "core.commandview"
|
||||||
local StatusView = require "core.statusview"
|
local StatusView = require "core.statusview"
|
||||||
|
|
||||||
local max_last_finds = 50
|
local last_view, last_fn, last_text, last_sel
|
||||||
local last_finds, last_view, last_fn, last_text, last_sel
|
|
||||||
|
|
||||||
local case_sensitive = config.find_case_sensitive or false
|
local case_sensitive = config.find_case_sensitive or false
|
||||||
local find_regex = config.find_regex or false
|
local find_regex = config.find_regex or false
|
||||||
|
@ -54,9 +53,9 @@ end
|
||||||
|
|
||||||
|
|
||||||
local function find(label, search_fn)
|
local function find(label, search_fn)
|
||||||
last_view, last_sel, last_finds = core.active_view,
|
last_view, last_sel = core.active_view,
|
||||||
{ core.active_view.doc:get_selection() }, {}
|
{ core.active_view.doc:get_selection() }
|
||||||
local text = last_view.doc:get_text(table.unpack(last_sel))
|
local text = last_view.doc:get_text(unpack(last_sel))
|
||||||
found_expression = false
|
found_expression = false
|
||||||
|
|
||||||
core.command_view:set_text(text, true)
|
core.command_view:set_text(text, true)
|
||||||
|
|
Loading…
Reference in New Issue