Skip to content

Commit

Permalink
Fix #245 ZZ and ZQ are broken again
Browse files Browse the repository at this point in the history
  • Loading branch information
gerardroche committed Nov 9, 2017
1 parent 039af63 commit ea1fb96
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 24 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ All notable changes are documented in this file using the [Keep a CHANGELOG](htt

### Fixed

* Fixed [#245](https://github.com/NeoVintageous/NeoVintageous/issues/245): `ZZ` and `ZQ` are broken again
* Fixed [#290](https://github.com/NeoVintageous/NeoVintageous/issues/290): Commands that start with underscore should not be mappable
* Fixed [#289](https://github.com/NeoVintageous/NeoVintageous/issues/289): `:help {subject}` should goto `:{subject}` if `{subject}` not found

Expand Down
1 change: 0 additions & 1 deletion lib/cmds/ex_actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -1338,7 +1338,6 @@ def run(self, command_line=''):
class ExExit(ViWindowCommandBase):

def run(self, command_line=''):
assert command_line, 'expected non-empty command line'
if self._view.is_dirty():
self.window.run_command('save')

Expand Down
25 changes: 2 additions & 23 deletions lib/vi/cmd_defs.py
Original file line number Diff line number Diff line change
Expand Up @@ -1695,23 +1695,6 @@ def translate(self, state):
}


@keys.assign(seq=seqs.BIG_Z_BIG_Z, modes=_MODES_ACTION)
class ViQuit(ViOperatorDef):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.updates_xpos = True
self.scroll_into_view = True

def translate(self, state):
return {
'action': 'ex_quit',
'action_args': {
'forced': True,
'count': state.count
}
}


@keys.assign(seq=seqs.G_BIG_H, modes=_MODES_ACTION)
class ViEnterSelectModeForSearch(ViOperatorDef):
def __init__(self, *args, **kwargs):
Expand Down Expand Up @@ -2054,8 +2037,7 @@ def translate(self, state):
return {
'action': 'ex_quit',
'action_args': {
'forced': True,
'count': state.count
'command_line': 'q!'
}
}

Expand All @@ -2069,10 +2051,7 @@ def __init__(self, *args, **kwargs):
def translate(self, state):
return {
'action': 'ex_exit',
'action_args': {
'mode': state.mode,
'count': state.count
}
'action_args': {}
}


Expand Down

0 comments on commit ea1fb96

Please sign in to comment.