atom / atom

:atom: The hackable text editor
https://atom.io
MIT License
60.15k stars 17.4k forks source link

Incorrect doc-block autocomplete #6835

Closed sinesc closed 9 years ago

sinesc commented 9 years ago

Atom 0.199.0/win32 with all community packages disabled incorrectly autocompletes the following as soon as @ is typed:

/**
 * @

This gets completed to...

/**
 /**
  * @

Sorry if this is a duplicate. Is there a way to search for single, non-alphanumeric characters on github (i.e. @) ?

lee-dohm commented 9 years ago

I cannot reproduce this behavior on Atom v0.200.0-1a8ebd5 on Mac OS X 10.10.3. Here is what I attempted:

  1. Open Atom
  2. Open a new file using Cmd+N (plain text grammar automatically selected by Atom)
  3. Type /** on the first line
  4. Type * @ on the second line

Expected and Actual: Nothing happens beyond the entry of the characters

ghost commented 9 years ago

Can confirm that problem on my PC with Windows 7 64-bit. Another thing is I can't type the character @ in atom. Repeated that steps on my linux laptop, there this problem don't appear and I can type the character @.

lee-dohm commented 9 years ago

@Seadragon91 are you using a US English keyboard layout? Or something else?

ghost commented 9 years ago

I am using a German keyboard layout.

lee-dohm commented 9 years ago

Ok, I believe this and atom/autoflow#27 are both duplicates of atom/atom-keymap#35. When you type @, I suspect Atom is thinking you're pressing Ctrl+Alt+Q, which activates the autoflow command. Please use the Keybinding Resolver (Ctrl+. on Windows/Linux, I believe) to confirm.

sinesc commented 9 years ago

Looks like you're right...

unset! .platform-win32 .editor (keymap.cson)
autoflow:reflow-selection .platform-win32 atom-text-editor, .platform-linux atom-text-editor (...autoflow.json)

I have now tried to append this to keymap.cson without success (now shows up in resolver as well along with the reflow stuff):

'.platform-win32 atom-text-editor, .platform-linux atom-text-editor':
  'ctrl-alt-q': 'unset!'
lee-dohm commented 9 years ago

So there are two issues here. One is atom/atom-keymap#35. The other is atom/autoflow#27. I'm going to close this as a duplicate of them since they are on the packages that the bugs are actually in. Please let me know if there is anything else I can do or answer :grinning:

sinesc commented 9 years ago

Ffr: https://github.com/atom/atom-keymap/issues/35#issuecomment-52508869 is a workaround. Just replace "ctrl-alt-[" with "ctrl-alt-q". Simply using !unset, !native, !abort, !whatever won't work, those are apparently broken as well.

lock[bot] commented 5 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. If you can still reproduce this issue in Safe Mode then please open a new issue and fill out the entire issue template to ensure that we have enough information to address your issue. Thanks!