Skip to content

Commit

Permalink
Fix #108: allow defining key_quit to :GdbDebugStop
Browse files Browse the repository at this point in the history
  • Loading branch information
sakhnik committed May 13, 2020
1 parent 6a1d32b commit 9f90fc4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions doc/nvimgdb.txt
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ allows overriding the given keys. For example, the default config is: >
\ 'key_frameup': '<c-p>',
\ 'key_framedown': '<c-n>',
\ 'key_eval': '<f9>',
\ 'key_quit': None,
\ 'set_tkeymaps': 'function("GdbCallAsync", "keymaps.set_t")',
\ 'set_keymaps': 'function("GdbCallAsync", "keymaps.set")',
\ 'unset_keymaps': 'function("GdbCallAsync", "keymaps.unset")',
Expand Down
1 change: 1 addition & 0 deletions rplugin/python3/gdb/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class Config(Common):
'key_frameup': '<c-p>',
'key_framedown': '<c-n>',
'key_eval': '<f9>',
'key_quit': None,
'set_tkeymaps': Keymaps.set_t,
'set_keymaps': Keymaps.set,
'unset_keymaps': Keymaps.unset,
Expand Down
2 changes: 2 additions & 0 deletions rplugin/python3/gdb/keymaps.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def set_dispatch_active(self, state: bool):
('n', 'key_framedown', ':GdbFrameDown'),
('n', 'key_eval', ':GdbEvalWord'),
('v', 'key_eval', ':GdbEvalRange'),
('n', 'key_quit', ':GdbDebugStop'),
}

def set(self):
Expand Down Expand Up @@ -58,6 +59,7 @@ def unset(self):
('key_next', ':GdbNext'),
('key_step', ':GdbStep'),
('key_finish', ':GdbFinish'),
('key_quit', ':GdbDebugStop'),
}

def set_t(self):
Expand Down

2 comments on commit 9f90fc4

@sheoak
Copy link

@sheoak sheoak commented on 9f90fc4 May 13, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does work but it leaves a new "no name" buffer opened every time

@sakhnik
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! It might be related to the other issue #48.

Please sign in to comment.