You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 3, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Mar 3, 2023. It is now read-only.
Surrounding multiple words with ` characters is broken #6940
I'm not sure which package is responsible so I'm reporting the issue here. Tested with 0.202.0-ec5b807 in --safe mode.
When you select multiple words and surround them with " or ' signs everything works perfectly. However, when I try to do the same with -signs something weird happens (gif is easiest to show). First the words disappear, then I press Space and they reappear - wrapped - but the words are wrong. Note that Cmd-Z removes the -signs but can not restore the original words.
I'm not able to reproduce this with Atom 0.202.0-4bbfe37 in safe mode:
Anything in your init.coffee file or other local config files? Can you reproduce this if you move the .atom folder somewhere else (and restart Atom after that)? Which OS are you on (not sure how that would make a difference, but worth asking for completeness)?
Rebuild atom to 0.202.0-4bbfe37, removed the ~/.atom folder and tried again in atom --safe mode. Problem persists. I'm pretty sure it has to do with the OS, im on OSX 10.10.3.
You can produce letters like á é ú by pressing and then a/e/u. OSX waits on the following character to see if it should be replaced. If I press space gets inserted, if I press a/e/u it inserts àèù:
As soon as I press Space atom expands the one ` sign to ``. Not that much we can change about that (OS behaviour), but why is atom replacing the first word?
OS Locale is English, Keyboard layout is German (QWERTZ). (Edit: Problem persists with US-layout)
No I have a german keyboard layout. Switching to US makes it behave like on your machine now and the surrounding works.
Question remains, why is atom replacing the first word? I would understand if it would delete both words but instead it does this weird thing. + Undoing will not restore the original state, which is weird.
Question remains, why is atom replacing the first word?
I'm not sure, but I'm trying to figure out one thing at a time. I think that's easier and less complicated than discussing 2 different issues at the same time.
I'd say that surrounding words with backticks isn't broken, it's more how the OS is handling those backtickts. If you select two words, as you did in the GIF, then press the backtick, and then press escape, what do you see then (with the german layout)? Can you record a GIF of that with the keybinding resolver shown?
Thanks -- that looks broken to me as well (pressing escape seems to do the same thing as pressing space, which is what you were doing originally, but just wanted to confirm).
/cc @nathansobo for 👀 -- any chance this is an easy fix ™️ ? 😄
This seems to be related to our general issues with international keyboard support due to bugs in Chrome. The keybinding resolver seems to identify the keystroke as Å when I enter a backtick via the German layout. Can you guys confirm the same behavior. We already have a bunch of known issues on international layouts so add this to the list.
I can confirm that behaviour, you can see it in my latest gif too.
However, question remains, why does it replace the first word? I would totally understand if the wrapping failed or nothing happend at all, but the behaviour seems really odd. Why does it wrap the word at all if the keyboard layout is the main problem?
Still got the problem on 1.0.2 on OS X, using a German (QWERTZ) keyboard layout.
When I select multiple lines, then try to wrap them in backticks, confirm the (dead) backtick key with a space, it replaces all words with the first one, and, of course, there's no way to undo that either.
same editor behavior as if we have typed the letter "a" or any non bracket.
User input "space"
OS filter: backward replace COMBINING+ SPACE into GRAVE ACCENT `
Enter insertText
Enter wrapSelectionInBrackets
True isOpeningBracketL156 selection.getBufferRange() L167 - for some reason this return value of last selected item before overwrite.
The way OS filter do the backward replacement probably skipped a buffer clean-up mechanism.
We now have this item everywhere:
`lastItem`
If hypothesis is true, something like this could fix it:
The idea would be to trigger this cancel event (so we do nothing with the modifier/combining char) and wait for the OS filter to give us proper char accent `
Issue #8667 has been closed but add the important point that this current issue is not limited to the back-tick. This could occurs with any character that is both an accent and a bracket. ```, ', and possibly one day something like `^` and `~`
The range of character interesting to this issue could be
Spacing Modifier Letters (02B0-02FF)
Combining Diacritical Marks (0300–036F)
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
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!
Activity
izuzak commentedon May 25, 2015
I'm not able to reproduce this with Atom 0.202.0-4bbfe37 in safe mode:
Anything in your init.coffee file or other local config files? Can you reproduce this if you move the .atom folder somewhere else (and restart Atom after that)? Which OS are you on (not sure how that would make a difference, but worth asking for completeness)?
nshtg commentedon May 25, 2015
Rebuild atom to
0.202.0-4bbfe37, removed the~/.atomfolder and tried again inatom --safemode. Problem persists. I'm pretty sure it has to do with the OS, im on OSX 10.10.3.You can produce letters like á é ú by pressing
and then a/e/u. OSX waits on the following character to see if it should be replaced. If I press spacegets inserted, if I press a/e/u it inserts àèù:As soon as I press Space atom expands the one ` sign to ``. Not that much we can change about that (OS behaviour), but why is atom replacing the first word?
OS Locale is English, Keyboard layout is German (QWERTZ). (Edit: Problem persists with US-layout)
izuzak commentedon May 25, 2015
I'm on OSX as well.
Not on my machine:
Which keyboard layout are you using? Not US, I'm guessing?
nshtg commentedon May 25, 2015
No I have a german keyboard layout. Switching to US makes it behave like on your machine now and the surrounding works.
Question remains, why is atom replacing the first word? I would understand if it would delete both words but instead it does this weird thing. + Undoing will not restore the original state, which is weird.
izuzak commentedon May 25, 2015
I'm not sure, but I'm trying to figure out one thing at a time. I think that's easier and less complicated than discussing 2 different issues at the same time.
I'd say that surrounding words with backticks isn't broken, it's more how the OS is handling those backtickts. If you select two words, as you did in the GIF, then press the backtick, and then press
escape, what do you see then (with the german layout)? Can you record a GIF of that with the keybinding resolver shown?nshtg commentedon May 25, 2015
izuzak commentedon May 25, 2015
Thanks -- that looks broken to me as well (pressing
escapeseems to do the same thing as pressingspace, which is what you were doing originally, but just wanted to confirm)./cc @nathansobo for 👀 -- any chance this is an easy fix ™️ ? 😄
nathansobo commentedon May 26, 2015
This seems to be related to our general issues with international keyboard support due to bugs in Chrome. The keybinding resolver seems to identify the keystroke as
Åwhen I enter a backtick via the German layout. Can you guys confirm the same behavior. We already have a bunch of known issues on international layouts so add this to the list.nshtg commentedon May 26, 2015
I can confirm that behaviour, you can see it in my latest gif too.
However, question remains, why does it replace the first word? I would totally understand if the wrapping failed or nothing happend at all, but the behaviour seems really odd. Why does it wrap the word at all if the keyboard layout is the main problem?
slhck commentedon Jul 17, 2015
Still got the problem on 1.0.2 on OS X, using a German (QWERTZ) keyboard layout.
When I select multiple lines, then try to wrap them in backticks, confirm the (dead) backtick key with a space, it replaces all words with the first one, and, of course, there's no way to undo that either.
jeancroy commentedon Jul 23, 2015
Some idea: I believe the key point is when all text disappear.
When someone type " ` " :
COMBINING + a = à
COMBINING + SPACE = GRAVE ACCENT
COMBINING + ESC = GRAVE ACCENT
Looking at the @slhck screenshot here are the events I see
Hypothesis: the issue exist because on some os/local we get the input in a two step process.
hint? : the fact that, in animated screenshot, all selection got replaced.
And that, before finishing the two-step entry of GRAVE ACCENT `
Hypothetical stack trace:
User input \u0300
editor default behavior: overwrite
User input "space"
OS filter: backward replace COMBINING+ SPACE into GRAVE ACCENT `
Enter
insertTextEnter
wrapSelectionInBracketsTrue
isOpeningBracketL156selection.getBufferRange() L167 - for some reason this return value of last selected item before overwrite.
The way OS filter do the backward replacement probably skipped a buffer clean-up mechanism.
We now have this item everywhere:
If hypothesis is true, something like this could fix it:
The idea would be to trigger this cancel event (so we do nothing with the modifier/combining char) and wait for the OS filter to give us proper char accent `
jeancroy commentedon Sep 5, 2015
Issue #8667 has been closed but add the important point that this current issue is not limited to the back-tick. This could occurs with any character that is both an accent and a bracket. ```,
', and possibly one day something like `^` and `~`The range of character interesting to this issue could be
Spacing Modifier Letters (02B0-02FF)
Combining Diacritical Marks (0300–036F)
stale commentedon Aug 29, 2017
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
lock commentedon Mar 30, 2018
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!