usql icon indicating copy to clipboard operation
usql copied to clipboard

Issues due to tab switching in windows

Open nilayrane opened this issue 6 years ago • 5 comments

After window switch, coming back to usql window, tab switching problem generally happens when some query is written but not executed and after coming back to usql window and using back space.

  1. key strokes- d,f,b don't work.
  2. Back space erases multiple key strokes at once.

nilayrane avatar Jul 03 '19 10:07 nilayrane

@nilayrane this is probably an issue with the readline package that usql uses. Could you elaborate on what operating system / platform you were using, please?

kenshaw avatar Nov 14 '19 22:11 kenshaw

I can confirm it's a bug in readline. Most probably reported upstream there

thda avatar Dec 19 '19 16:12 thda

@thda appreciate the feedback. It's long been on my personal backlog to do a brand new, full native Go package for readline support that would overcome these issues, as I've long been cognizant of the limitations of the readline package that usql uses. Go really needs something akin to prompt-toolkit in Python) but that is a large enough task / time sink that I haven't been able to get around to it. My estimate is that a proper prompt/readline package in Go would be ~4000-5000 lines of code on its own (ie, equivalent to the complexity/line count of usql itself), and as such is why I have yet to undertake it.

kenshaw avatar Dec 19 '19 16:12 kenshaw

@kenshaw hi Ken. It's indeed a lack. There are some building blocks in crypto/ssh/terminal and gdamore/tcell/terminfo though.

thda avatar Dec 19 '19 17:12 thda