refactor: Remove G/Z Namespace support

This previously enabled things like `d g g` to work, but we can
fix that instead by not clearing out pending vim state on change.

Either way, it is unnecessary and causes some user-confusion
(zed-industries/community#176), so remove this code for now; and use
comments to organize the file a bit instead.
This commit is contained in:
Conrad Irwin 2023-07-19 18:54:29 -06:00
parent 35400d5797
commit 8ba69c15d1
5 changed files with 34 additions and 79 deletions

View file

@ -127,9 +127,8 @@ pub fn init(cx: &mut AppContext) {
}
pub(crate) fn motion(motion: Motion, cx: &mut WindowContext) {
if let Some(Operator::Namespace(_))
| Some(Operator::FindForward { .. })
| Some(Operator::FindBackward { .. }) = Vim::read(cx).active_operator()
if let Some(Operator::FindForward { .. }) | Some(Operator::FindBackward { .. }) =
Vim::read(cx).active_operator()
{
Vim::update(cx, |vim, cx| vim.pop_operator(cx));
}