SPCodeOrg / SPCode

A lightweight SourcePawn editor.
https://forums.alliedmods.net/showthread.php?p=2693577
61 stars 14 forks source link

Autocomplete window is shown on an empty line with indentation #120

Closed azalty closed 2 years ago

azalty commented 2 years ago

Version SPCode Beta rev 1094

Describe the bug The autocomplete window is shown when on an empty line with a tabulation, hiding things and making us unable to create a new line with enter, since it would write the first definition found instead.

To Reproduce Steps to reproduce the behavior:

  1. Create a new line with at least 1 indentation (tab)
  2. The autocomplete window appears
  3. Press enter and cry.

Screenshots image

azalty commented 2 years ago

Still not fixed as of rev 1149 though

maxijabase commented 2 years ago

I can't seem to reproduce this in 1149.

azalty commented 2 years ago

image Must be an include that's faulty, because we can see that the first 3 options have a tabulation at the start

This doesn't happen in the stable branch of SPCode though

azalty commented 2 years ago

The faulty includes:

entities.inc (from smlib) image

hosties.inc image

#define + space + tab causes this problem

Not sure if we can consider this a program bug or an include bug

maxijabase commented 2 years ago

Oh yeah, I just included smlib and now can reproduce. We'll see how we sort it out.

Hexer10 commented 2 years ago

I just pushed a commit that should address this issue, it should be available in the next beta version.

azalty commented 2 years ago

Thanks! This seems fixed.