Re: [Lazarus] Highlight matching brackets

2017-12-12 Thread Juha Manninen via Lazarus
On Tue, Dec 12, 2017 at 10:44 AM, Ondrej Pokorny via Lazarus
 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
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Highlight matching brackets

2017-12-12 Thread Ondrej Pokorny via Lazarus

On 11.12.2017 21:30, Juha Manninen via Lazarus 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
--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Highlight matching brackets

2017-12-11 Thread Juha Manninen via Lazarus
On Mon, Dec 11, 2017 at 10:13 PM, Martin Frb via Lazarus
 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
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Highlight matching brackets

2017-12-11 Thread Martin Frb via Lazarus

On 11/12/2017 20:05, Martin Frb via Lazarus wrote:


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.
--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Highlight matching brackets

2017-12-11 Thread Martin Frb via Lazarus

On 11/12/2017 19:49, Juha Manninen via Lazarus wrote:

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?

--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Highlight matching brackets

2017-12-11 Thread Juha Manninen via Lazarus
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
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Highlight matching brackets

2017-12-11 Thread Martin Frb via Lazarus

On 11/12/2017 19:28, john landmesser via Lazarus wrote:


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.


--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Highlight matching brackets

2017-12-11 Thread john landmesser via Lazarus

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:


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: Lazarus@lists.lazarus-ide.org
> 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
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus




-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Highlight matching brackets

2017-12-11 Thread Vojtěch Čihák via Lazarus

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: Lazarus@lists.lazarus-ide.org
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
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus 


-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus