Skip to content
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

Issues about Auto Completion Ignore Case #654

Closed
lifenjoiner opened this issue May 1, 2023 · 7 comments
Closed

Issues about Auto Completion Ignore Case #654

lifenjoiner opened this issue May 1, 2023 · 7 comments

Comments

@lifenjoiner
Copy link
Contributor

There should be 2:

  1. Uppercase and lowercase are equal, while dictionary generating. Only the 1st word among different forms is adopted. In practice, ALL should be adopted, but sorted and matched ignoring case while typing.
  2. The 2nd item of the matching results is focused by default, rather than the 1st one. Only ESC is the way to input exactly what is typed.
Notepad2 (32-bit) 4.23.04 r4766 (9b680ba8)
Compiled on Apr 15 2023 with Visual C++ 19.35.32217.1,
Scintilla 5.3.4.
Encoding: UTF-8, GBK
Scheme: , Text File
System: 10.0.19045  x64

auto-completion

TEST auto completion
test
tests
TESTS
testER
tester
testing
Test
@zufuliu
Copy link
Owner

zufuliu commented May 1, 2023

  1. can be solved by using custom string comparison function (e.g. do case insensitive comparison first, then case sensitive comparison), CompareNCaseInsensitive() used in scintilla\src\AutoComplete.cxx also needs updating.
  2. related to https://github.com/zufuliu/notepad2/blob/5258246f7685b32004d41c0d6d0a99613ccff6fe/src/EditAutoC.c#L1659-L1663
    change the if to SciCall_AutoCSetCaseInsensitiveBehaviour(bIgnoreCase) make it works.

@zufuliu zufuliu added this to the v4.23.06 milestone May 1, 2023
@zufuliu
Copy link
Owner

zufuliu commented May 1, 2023

Implemented by f66089f (except word list is sorted case sensitively).

@zufuliu
Copy link
Owner

zufuliu commented May 1, 2023

Word list is actually sorted "randomly": first four letters sorted case insensitively (by WL_OrderFunc), then case sensitively (by WL_strcmp):
image

@zufuliu zufuliu removed this from the v4.23.06 milestone May 1, 2023
@zufuliu
Copy link
Owner

zufuliu commented May 1, 2023

Removed from v4.23.06 milestone as first issue is not fixed: use of WL_OrderFunc to comparison still cause word less than five letters to lose.
https://github.com/zufuliu/notepad2/blob/f66089f0847d5a9f647089d1252696b89ebb54b6/src/EditAutoC.c#L192-L203

@zufuliu zufuliu added this to the v4.23.06 milestone May 2, 2023
@lifenjoiner
Copy link
Contributor Author

use of WL_OrderFunc to comparison still cause word less than five letters to lose

👍 Didn't notice that.

It would be convenient if the words order is grouped case sensitive for "Ignore Case", considering the matching rate.
I guess you see what I mean. Case insensitive for different words, and then case sensitive for different cases of the "same" words. Seems not easy to do.

And still case sensitive for case sensitive.

@lifenjoiner
Copy link
Contributor Author

Is this expected? I don't know.

matching

@zufuliu
Copy link
Owner

zufuliu commented May 2, 2023

@zufuliu zufuliu closed this as completed Jun 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants