Autocomplete issues

pintassilgo
Posts: 24
Joined: 08.03.2023 07:48

Post by pintassilgo »

Pls, test the Linux beta,
Excellent, thank you!
I confirm autocomplete is instant as expected, popup height is now dynamic without removing scrollbar and also the open popup no longer creates a window/tab in taskbar.

One more important improvement request, in my opinion: autocomplete is stealing focus when it shouldn't. Example: if I type "doc", autocomplete opens with suggestions such as "document". Then I press Shift+Home. I want to make a selection from the cursor position to the start of the line, moving the cursor to the start of the line, like selecting the word "doc" if it's the only word of the line. This should also close the autocomplete popup. This is how editors such as Notepad++ and Kate behave. On CudaText, however, the focus is automatically switched to the popup so Shift+Home does nothing, as it recognizes just "Home" as the shortcut to jump to the first item of the popup - which is already preselected. Autocomplete should only gain focus after I press up or down to navigate the list. Otherwise, combinations like Shift+Home should behave normally and also close the popup.

There's also one minor: if I press Alt+Tab to switch active window while autocomplete popup is open, I obviously want to switch to a different window/app, but it stays on CudaText because autocomplete popup is still treated as its own window, even not showing in taskbar.
It was list of fixed words. static list. not considering the objectname before dot. poor.
Yes. The default autocomplete (non-LSP) of Notepad++ and Kate are also this way, except they are more complete, the removed .acp was missing many words.
As I said, I think I managed the LSP typescript-language-server to work as I expected except that it's purely restricted to usable values like variables, objects, properties. It's not working to complete random words present in the text as in the example I gave:

let array1 = ['apple', 'banana'];
let array2 = ['app

Then typing the code above, "apple" should be suggested to autocomplete, but it doesn't happen unless I have a declared variable named apple.
main Alexey
Posts: 2406
Joined: 25.08.2021 18:15

Post by main Alexey »

I made the change: now Shift+Left, Shift+Right (select left/right), and Ctrl+Tab (switch active ui tab) are passed from autocompl window to editor.
Alt+Tab ? I don't see issue with it. I am on Ubuntu 20.04.
maybe because I fixed the reaction to TAB key today? (before, editor handled TAB with any modifier)

I think I managed the LSP typescript-language-server to work as I expected except that it's purely restricted to usable values like variables, objects, properties.
That is fine feature request to LSP server authors! not for Cud.
pintassilgo
Posts: 24
Joined: 08.03.2023 07:48

Post by pintassilgo »

Thanks, I'll try it. Is the build from http://uvviewsoft.com/c/ updated to this last change?
main Alexey
Posts: 2406
Joined: 25.08.2021 18:15

Post by main Alexey »

Now Shift+Home, Shift+End are handled in autocompl popup too. note: when autocompl popup is visible, it has the focus! so for each special hotkey I must add additional handling.

beta-file will be updated tomorrow.
pintassilgo
Posts: 24
Joined: 08.03.2023 07:48

Post by pintassilgo »

At the moment I'm out and can't test, but from what I remember Shift+Home was just an example, I'm pretty sure there are other affected, including Home and End without modifiers.
pintassilgo
Posts: 24
Joined: 08.03.2023 07:48

Post by pintassilgo »

I originally misstyped Ctrl+Tab, but actually meant Alt+Tab then edited the comment. The issue, which is very minor, is that the popup is still counted as a window in Alt+Tab even if it's not displayed in taskbar. So if I press Alt+Tab to switch to the most recent used window, the main CudaText window is activated because when popup is visible it's is own window and it's activated. I use KDE Plasma.

This one is not important, but if it's possible to make popup not count as one window it would be better and would fix that.
main Alexey
Posts: 2406
Joined: 25.08.2021 18:15

Post by main Alexey »

> Shift+Home was just an example, I'm pretty sure there are other affected, including Home and End without modifiers.
Home, End: moves selection in listbox
> popup is still counted as a window in Alt+Tab
I dont know how to fix that yet.
Last edited by main Alexey on 09.03.2023 07:25, edited 1 time in total.
main Alexey
Posts: 2406
Joined: 25.08.2021 18:15

Post by main Alexey »

Alt+Tab: found the solution. beta updated to filename cud-autocompl-new3.zip
EDIT:
sorry, that fix has shown the popup border. reverted.
pintassilgo
Posts: 24
Joined: 08.03.2023 07:48

Post by pintassilgo »

Thanks, I confirm Shift+Home/End is escaping from popup focus as expected.
main Alexey wrote:Home, End: moves selection in listbox
I know, but the usual behavior for editors (at least Notepad++ and Kate, but I guess it also applies to the others) is for Home and End to move cursor to beginning or end of the line, ignoring the autocomplete popup. I think CudaText should comply with that. It's much more likely than a user that presses Home wants to move cursor to start of the line instead of wanting to change selected item in autocomplete popup.
Last edited by pintassilgo on 09.03.2023 07:49, edited 1 time in total.
pintassilgo
Posts: 24
Joined: 08.03.2023 07:48

Post by pintassilgo »

main Alexey wrote:Alt+Tab: found the solution. beta updated to filename cud-autocompl-new3.zip
EDIT:
sorry, that fix has shown the popup border. reverted.
Couldn't find new3, but new4 still lists popup as its own window, disturbing Alt+Tab when popup is open.
Post Reply