Menu

#2265 Autocomplete height from 9 items to 1 item

Bug
closed-fixed
nobody
5
2021-07-26
2021-06-29
No

autoc.gif

Test with Sc510.exe x64. Minimal SciTEGlobal.properties and lua.api to test autocomplete.

SciTEGlobal.properties:

position.width=635
position.height=435
api.$(file.patterns.lua)=$(SciteDefaultHome)\lua.api
autocomplete.lua.start.characters=$(chars.alpha)$(chars.numeric)$(chars.accented)_%

lua.api:

or
os.clock
os.date
os.difftime
os.execute
os.exit
os.getenv
os.remove
os.rename

The autocomplete displays 9 items, then later 1 item. Python and other languages can also display this issue with the autocomplete height.

Steps to reproduce:

  1. Open test.lua
  2. Type o which displays autocomplete with height of 9 items
  3. Undo typed o to reset (optional!)
  4. Open a new blank tab
  5. Type aa
  6. Type space and a
  7. Press Ctrl+Enter which displays autocomplete with aa (important!)
  8. Activate test.lua tab
  9. Type o which displays autocomplete with height of only 1 item

I can resize the autocomplete to display more items. The autocomplete triggered from then onwards, will display as a height of 1 item. Restarting editor seems to be the only action to get the initial 9 item display again.

This issue might be able to be reproduced in other ways, though this is a way I found that can be reproduced everytime. Tested on a desktop running Windows 7 SP1 and a laptop running Windows 10 1909 with the same results.

Sc503.exe does not have this issue.

Some printf output at bottom of ScintillaBase::AutoCompleteStart with the same steps to reproduce. This time used SciTE.exe, Lexilla.dll and Scintilla.dll, so I just needed to recompile Scintilla.dll to test:

list=or os.clock os.date os.difftime os.execute os.exit os.getenv os.remove os.rename
rcList.top=48.000000
rcList.bottom=206.000000
rcList.left=23.000000
rcList.right=149.000000
heightLB=100
widthLB=126

list=aa
rcList.top=16.000000
rcList.bottom=46.000000
rcList.left=42.440235
rcList.right=168.440235
heightLB=100
widthLB=126

list=or os.clock os.date os.difftime os.execute os.exit os.getenv os.remove os.rename
rcList.top=48.000000
rcList.bottom=78.000000
rcList.left=23.000000
rcList.right=166.000000
heightLB=100
widthLB=143

Height of aa list is 46-16=30, same height of last o list is 78-48=30. rcList.left and rcList.right for aa list are not whole numbers. The last widthLB is larger (143) than the previous two instances which seems odd. Unsure if helpful information. Output from desktop with Windows 7 SP1.

1 Attachments

Related

Bugs: #2307

Discussion

  • Neil Hodgson

    Neil Hodgson - 2021-06-29
    • labels: scite --> scite, win32
    • status: open --> open-fixed
     
  • Neil Hodgson

    Neil Hodgson - 2021-06-29

    Fixed with [81d730].

     

    Related

    Commit: [81d730]

  • Michael Heath

    Michael Heath - 2021-06-29

    Applied patch, compiled and SciTE now displays autocomplete with correct height. Thankyou Neil.

     
  • Neil Hodgson

    Neil Hodgson - 2021-07-26
    • status: open-fixed --> closed-fixed
     
  • Neil Hodgson

    Neil Hodgson - 2021-07-26

    Fixed with [81d730].

     

    Related

    Commit: [81d730]


Log in to post a comment.

MongoDB Logo MongoDB