Closed 50Wliu closed 6 years ago
I agree this is definitely a bug, but I'm curious what user-visible negative effects it produces. Is it just the resource leak of the markers?
There's no real visible downsides of this, except that shift-tabbing can unexpectedly move you back to the last tab stop (which could be a long ways back) instead of decreasing indentation.
Prerequisites
Description
Snippet tab stop markers are not removed correctly after reaching the last tab stop and typing. The last tab stop should be treated differently than all the rest. After any whitespace is entered, the tab stop markers should be invalidated. Instead, as long as you are at the final tab stop, the only way that I can find to invalidate the tab stops is to edit the previous tab stops. This essentially means that the number of markers will never stop growing as long as the last tab stop is always reached and previous tab stops are not touched.
Steps to Reproduce
fora
snippet# body...
is highlightededitor:select-all
followed by backspace), etc.let editor = atom.workspace.getActiveTextEditor()
editor.getMarkers().length
Expected behavior: If whitespace or destructive actions was created in step 5, step 7 should return 0
Actual behavior: Step 7 returns at least 3
Reproduces how often: 100%
Versions