Potential issue in atom-keymap


#1

Hi all,

I’m not exactly sure if i should open an issue in the atom-keymap package or not.

Basically this line:

is causing some problems when using the proton-mode package with vim-mode-plus.
the problem is that because vim-mode-plus binds ‘g ^’ to something and proton does it’s own command chain thing this causes the atom-keymap package to throw when doing ‘SPC g’

See issue: https://github.com/dvcrn/proton/issues/286 for more details.

But the code its self does not look right to me.
That particular line asumes that the ^ will never be used as a keybining because of the ‘startsWith’ bit.

Imo it should also make sure that there are more chars. i.e startWith && length != 1.

Should i open an issue for this or is this the intended behaviour of this module?

Cheers,
Boogie


#2

I personally can’t say if it’s intended or not and I was going to suggest going ahead with opening an issue (fill out the template, share as much detail as possible to reproduce, etc.) but I just checked out https://github.com/dvcrn/proton/issues/286 and I see that @jackcasey is planning top open a PR in atom-keymap?

If that doesn’t end up happening for whatever reason, I think opening an issue is fine :+1:


#3

It looks like a PR was opened https://github.com/atom/atom-keymap/pull/221

Looking at the PR it does seem like a bug. But I am not very familiar with the partial matches and keyup handling. It seems that a similar bug was fixed in https://github.com/atom/atom-keymap/pull/196 where a keystroke ending in ^ did not dispatch immediately.

I’ll check out the PR asap so I get a chance to get familiar with this part of atom-keymap :zap:


#4

@Ben3eeE cool. I didn’t notice that, i’m also part of the proton issue mentioned in the PR, didn’t know that they had already move forward with this :slight_smile:

Cheers and thx for the info. not sure how ‘close’ this thread, so if that’s a thing can you do it.

Best Regads,
Boogie