mirror of
https://github.com/TimUntersberger/neogit
synced 2024-09-16 14:24:09 +02:00
Do not move the cursor if buffer isn't focused. Fixes issue #1429
This commit is contained in:
parent
a232e38512
commit
56c31c4603
2 changed files with 3 additions and 3 deletions
|
@ -288,7 +288,7 @@ function M:redraw(cursor, view)
|
|||
logger.debug("[STATUS] Rendering UI")
|
||||
self.buffer.ui:render(unpack(ui.Status(self.state, self.config)))
|
||||
|
||||
if cursor and view then
|
||||
if cursor and view and self.buffer:is_focused() then
|
||||
self.buffer:restore_view(view, self.buffer.ui:resolve_cursor_location(cursor))
|
||||
end
|
||||
end
|
||||
|
|
|
@ -158,7 +158,7 @@ end
|
|||
|
||||
---@param line nil|number|number[]
|
||||
function Buffer:move_cursor(line)
|
||||
if not line then
|
||||
if not line or not self:is_focused() then
|
||||
return
|
||||
end
|
||||
|
||||
|
@ -174,7 +174,7 @@ end
|
|||
|
||||
---@param line nil|number|number[]
|
||||
function Buffer:move_top_line(line)
|
||||
if not line then
|
||||
if not line or not self:is_focused() then
|
||||
return
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue