pyscripter / SynEdit

SynEdit is a syntax highlighting edit control, not based on the Windows common controls.
26 stars 11 forks source link

eoSmartTabs option is not working as it use to #88

Closed dados closed 4 months ago

dados commented 4 months ago

I don't know when this changed but I have a compiled program with editor options that allow me to turn Smart Tabs on/off And this was/is a very cool feature.

For example if I have some code/text like this

procedure doSomething(
                      p1,
                      p2,
p3
                      );

And with Smart Tabs as true when pushing the tab key with the cursor at the beginning of line with the p3 it would push the text to be level with p2. I have tried every combination of the properties but I cannot get it to work. I cannot even see any difference with this property true or false

The description in SynEdit.pas for this option is: eoSmartTabs, //When tabbing, the cursor will go to the next non-white space character of the previous line

But all it does is indent with the set tab size

In the procedure TCustomSynEdit.DoTabKey; there might be an bug. Approx line nr. 7887

// scan over whitespaces
if p^ <> #0 then
  repeat
    if (p^ <> #9) and (p^ <> #32) or (p^ <> #160) then break;    <---- HERE - the "or" should be "and" 
    Inc(i);
    Inc(p);
  until p^ = #0;

Could you please look at this issue

Thank you :)

pyscripter commented 4 months ago

Fixed. Thanks!