Skip to content

Commit

Permalink
chore(core): Removed unused state variables
Browse files Browse the repository at this point in the history
Ref: #177
  • Loading branch information
OXY2DEV committed Jan 12, 2025
1 parent ff7b889 commit aa69ee3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
7 changes: 1 addition & 6 deletions lua/definitions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,17 @@ local M = {};
--- Table containing various plugin states.
---@class mkv.state
---
---@field enable boolean Is the plugin enabled?
---@field hybrid_mode boolean Is hybrid mode enabled?
---@field attached_buffers integer[] List of attached buffers.
---
---@field buffer_states { [integer]: { enable: boolean, hybrid_mode: boolean?, events: boolean } } Buffer local states.
---@field buffer_states { [integer]: { enable: boolean, hybrid_mode: boolean? } } Buffer local states.
---
---@field splitview_source? integer Source buffer for hybrid mode.
---@field splitview_buffer? integer Preview buffer for hybrid mode.
---@field splitview_window? integer Preview window for hybrid mode.
---@field splitview_cstate? { enable: boolean, hybrid_mode: boolean?, events: boolean } Cached state for the source buffer.
M.states = {
enable = true,
hybrid_mode = true,
buffer_states = {
[10] = {
events = false,
enable = true,
hybrid_mode = true
}
Expand Down
5 changes: 2 additions & 3 deletions lua/markview.lua
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ end

--- Renders preview.
---@param buffer integer?
---@param state { enable: boolean, hybrid_mode: boolean?, events: boolean }?
---@param state { enable: boolean, hybrid_mode: boolean? }?
markview.render = function (buffer, state)
---+${lua}

Expand Down Expand Up @@ -308,8 +308,7 @@ markview.splitview_render = function (update_content, update_preview)
if update_preview ~= false then
markview.render(pre_buf, {
enable = true,
hybrid_mode = false,
events = false
hybrid_mode = false
});
end
---_
Expand Down

0 comments on commit aa69ee3

Please sign in to comment.