Fix bad _input assignemtn

pull/3/head
Iron-E 4 years ago
parent d5133e2c2f
commit e3a6b651a1
No known key found for this signature in database
GPG Key ID: 19B71B7B7B021D22

@ -608,6 +608,16 @@ want to for their mode specifically. >
------------------------------------------------------------------------------
functions *libmodal-lua-Mode-functions*
`self`.exit *libmodal-lua-Mode.exit*
A liason to the `g:`{name}`ModeExit` variable.
Type: ~
`libmodal.Vars`
Value: ~
`libmodal.Vars.new('exit', `{name}`)`
`self`.indicator *libmodal-lua-Mode.indicator*
The message that is shown in the bottom-left corner of the screen while the

@ -181,8 +181,8 @@ end
-------------------------------
function _metaMode:_inputLoop()
-- If the mode is not handling exit events automatically and the global exit var is true.
if self._exit.supress
and globals.is_true(self._exit:nvimGet())
if self.exit.supress
and globals.is_true(self.exit:nvimGet())
then
return false
end
@ -202,7 +202,7 @@ function _metaMode:_inputLoop()
self.input:nvimSet(userInput)
-- Make sure that the user doesn't want to exit.
if not self._exit.supress
if not self.exit.supress
and userInput == globals.ESC_NR then return false
-- If the second argument was a dict, parse it.
elseif type(self._instruction) == globals.TYPE_TBL then
@ -251,9 +251,9 @@ function Mode.new(name, instruction, ...)
-- Inherit the metatable.
local self = setmetatable(
{
['_exit'] = Vars.new('exit', name),
['exit'] = Vars.new('exit', name),
['indicator'] = Indicator.mode(name),
['_input'] = Vars.new('input', name),
['input'] = Vars.new('input', name),
['_instruction'] = instruction,
['_name'] = name,
['_winState'] = utils.WindowState.new(),
@ -262,7 +262,7 @@ function Mode.new(name, instruction, ...)
)
-- Define the exit flag
self._exit.supress = (function(optionalValue)
self.exit.supress = (function(optionalValue)
if optionalValue then
return globals.is_true(optionalValue)
else

Loading…
Cancel
Save