-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tabs breaking paren matching #131
Comments
Hmm, that's pretty strange, and yeah I agree with @technomancy - definitely a jline issue. How are you getting tabs into the REPL? Copy/paste? What version of Leiningen, OS, terminal, and shell are you using? I haven't been able to reproduce this in any released versions of REPLy, even by pasting tabs. I assume this is because tab triggers completion. Due to jline/jline2@2766027, if I actually go into the code and |
I'm using Leiningen 2.3.4 I'm using alt+tab to tab. |
I get the same behaviour in gnome-terminal. |
Cool, yeah, I see that with alt-tab now too, had no idea one could do that. This is actually way deeper than just paren-matching in jline - beginning-of-line/end-of-line don't work in the presence of tab characters either. I'd encourage you to submit a bug report at https://github.com/jline/jline2 - I guess the easy route for jline would be to compress tab characters to only take up 1 column in the console line it manages, but I'm not sure whether that's possible. |
Is there any way we could configure our usage of jline to treat tab insertions as spaces when it's not doing completion? |
Not that I can think of, though that'd be nice. The only thing that comes to mind is terrible: some sort of intermediate stream between us & jline where we change tab characters to spaces. But (a) that's evil and (b) it would break completion. I was pleasantly surprised to see that there is some notion of |
Parentheses matching breaks when tab characters are used. Explanation and possible solution:
11:22 < numberten> technomancy: the lein repl does this thing where it goes back momentarily to your opening paren when you enter a closing paren. and that feature is bugged with tabs
11:22 < technomancy> numberten: oh, gotcha
11:22 < numberten> it calculates go-back distance based on characters entered and since tabs take up way more space it breaks
11:22 < technomancy> numberten: bleaugh
11:22 < technomancy> numberten: pretty sure that's a jline2
11:23 < technomancy> *jline2 bug though
11:23 < numberten> i see
11:23 < technomancy> I'd love to just prevent the insertion of tabs entirely though
11:23 < numberten> just figured it might be easier to handle lein side if there was a config file
11:24 < technomancy> numberten: we might be able to add a workaround in lein, yeah
11:24 < technomancy> by binding tab to insert two spaces
11:24 < technomancy> even though the bug itself is in jline
The text was updated successfully, but these errors were encountered: