Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2017-12

Highlight matching brackets

10 messages · 5 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

John Landmesser

i think there is something wrong?!

Lazarus svn

Lazarus 1.9.0 r56691M FPC 3.0.4 x86_64-linux-gtk2

should highlight Brackets as () but it highlights single quotes '

that happens for WinXP too!

sceenshot of settings (right) and IDE (left)

.. could not send the sreenshot, it's over 100 kb!!

Reply by email

Vojtěch Čihák

I can confirm. It is also broken for [] and {}. I observed that it depends on previous character:  
ControlStyle:=ControlStyle+[csNoDesignVisible];  //works  
ControlStyle:=ControlStyle+ [csNoDesignVisible];  //does NOT work  
i.e. when previous char is "red" +-*/@() etc. it works, while abcde...ABCDE... or *space* doesn't. Also with UTF chars it doesn't work (ěščřžýáí)  
V.
______________________________________________________________

Show quoted text 5 lines
Od: John Landmesser via Lazarus Komu: Datum: 11.12.2017 19:33 Předmět: [Lazarus] Highlight matching brackets

i think there is something wrong?!

Lazarus svn

Lazarus 1.9.0 r56691M FPC 3.0.4 x86_64-linux-gtk2

should highlight Brackets as () but it highlights single quotes '

that happens for WinXP too!

sceenshot of settings (right) and IDE (left)

.. could not send the sreenshot, it's over 100 kb!!

Reply by email

john landmesser
to Vojtěch Čihák

issue occured after:

Lazarus 1.9.0 r56216M FPC 3.0.2 x86_64-linux-gtk2

Vojtěch Čihák wrote 42 lines
I can confirm. It is also broken for [] and {}. I observed that it depends on previous character: ControlStyle:=ControlStyle+[csNoDesignVisible]; //works ControlStyle:=ControlStyle+ [csNoDesignVisible]; //does NOT work i.e. when previous char is "red" +-*/@() etc. it works, while abcde...ABCDE... or *space* doesn't. Also with UTF chars it doesn't work (ěščřžýáí) V. ______________________________________________________________ > Od: John Landmesser via Lazarus > Komu: > Datum: 11.12.2017 19:33 > Předmět: [Lazarus] Highlight matching brackets > i think there is something wrong?! Lazarus svn Lazarus 1.9.0 r56691M FPC 3.0.4 x86_64-linux-gtk2 should highlight Brackets as () but it highlights single quotes ' that happens for WinXP too! sceenshot of settings (right) and IDE (left) .. could not send the sreenshot, it's over 100 kb!! -- _______________________________________________ Lazarus mailing list https://lists.lazarus-ide.org/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20171211/9867ead4/attachment.html>

Reply by email

Martin Frb
to john landmesser
john landmesser wrote 13 lines
issue occured after: Lazarus 1.9.0 r56216M FPC 3.0.2 x86_64-linux-gtk2 Am 11.12.17 um 20:04 schrieb Vojtěch Čihák via Lazarus: > > I can confirm. It is also broken for [] and {}. I observed that it > depends on previous character: > >

Most likely (not verified)
Revision: 56398
Message:
SynEdit: Enable operations for an identifier also when caret is at its end. Patch from Dmitry D. Chernov.

Reply by email

Martin Frb
to Juha Manninen
Juha Manninen wrote 13 lines
On Mon, Dec 11, 2017 at 9:34 PM, Martin Frb via Lazarus wrote: > Most likely (not verified) > Revision: 56398 > Message: > SynEdit: Enable operations for an identifier also when caret is at its end. > Patch from Dmitry D. Chernov. Ah, that is reported already. https://bugs.freepascal.org/view.php?id=32803 There were 2 identical block changed. Maybe only one of them should be changed. I try to look at it soon ... Juha

the change in GetHighlighterAttriAtRowColEx is wrong.

It should only change CaretAtIdentOrString, but I am failing to see how that works (did not debug, just looked at it, so I might be wrong)

In the line |=caret
a:=foo|(

It would have seen the "(", and returned false.

But with the patch, I would expect
a:=|foo(
to see the ":=" ?

So it just reverses the issue?

Reply by email

Martin Frb
to Martin Frb
Martin Frb wrote 16 lines
It should only change CaretAtIdentOrString, but I am failing to see how that works (did not debug, just looked at it, so I might be wrong) In the line |=caret a:=foo|( It would have seen the "(", and returned false. But with the patch, I would expect a:=|foo( to see the ":=" ? So it just reverses the issue?

Just checked, Contextmenu > Find > Rename Identifier

It now is enabled, if you are at the end of the identifier.

But it is disabled, if you are at the start of the identifier.

So both parts of the commit are wrong.

Reply by email

Juha Manninen
to Martin Frb
Martin Frb wrote
Just checked, Contextmenu > Find > Rename Identifier It now is enabled, if you are at the end of the identifier. But it is disabled, if you are at the start of the identifier. So both parts of the commit are wrong.

Yes. I reverted it in r56695. The change is already in 1.8 so I will mark this one to be merged to fixes_1_8.
Maybe Dmitry D. Chernov is reading. We need a better patch. ... or maybe Martin can say right away how to fix it. I have no time to debug it now.

In r56366 I fixed a similar issue in codetools when cursor is in uses section, at the end of a unit name.
For the sake of symmetry it would be nice to have this fixed, too.

Juha

Reply by email

Ondrej Pokorny
to Juha Manninen
Juha Manninen wrote
Yes. I reverted it in r56695. The change is already in 1.8 so I will mark this one to be merged to fixes_1_8.

I thought only bug fixes should go to the fixes branch and not new bugs.

Ondrej

Reply by email

Juha Manninen
to Ondrej Pokorny
Ondrej Pokorny wrote
I thought only bug fixes should go to the fixes branch and not new bugs.

Yes, I trusted the patch too much. I did not analyse it, I only tested the particular case when cursor was at the end of a word. Now I see the patch was very bad, the author had no idea what he was changing. :(

Juha

Reply by email