Re: [Geany-Devel] PairTagHighlighter / Not auto clear previous highlight when click other tag

2015-03-09 Thread Volodymyr Kononenko
Lex,

Thank for exhaustive answer!
A search with git bisect has shown, that the bug was introduced with
updating Scintilla to 3.3.2:

kvm@dell-e6220 /mnt/doc/devel/geany/geany $ git bisect good
f5588043b7e6bbd9dff5ac37eb37b00a503d192a is the first bad commit
commit f5588043b7e6bbd9dff5ac37eb37b00a503d192a
Author: Colomban Wendling b...@herbesfolles.org
Date:   Wed May 22 03:23:57 2013 +0200

Update Scintilla to version 3.3.2

Similar issue http://sourceforge.net/p/scintilla/bugs/1604/ I've found on
Scintilla bug tracker was fixed only for win32 - here is the patch
http://sourceforge.net/p/scintilla/code/ci/23f89aef53c7ab73bdd45ae1302b97698682e3cd
.
I tried to detect the first Scintilla commit, which introduced the issue,
but I see that merging Scintilla to Geany sources is non-trivial. Build
failed after the first attempt.

Folks, what do you think about it? Is it enough information that it is
Scintilla issue and we need to report it or something was not taken into
account during upgrading to 3.3.2?



On 8 March 2015 at 23:42, Lex Trotman ele...@gmail.com wrote:

 cd /somedirectory
 mkdir geany
 cd geany
 git clone https://github.com/geany/geany.git
 cd geany
 git checkout the_version_you_want
 ./autogen.sh --prefix=/somedirectory/geany
 make install
 cd ../bin
 ./geany -c ../config

 gives a version of geany completely independent of your system geany

 for plugins

 cd /somedirectory/geany

 git clone https://github.com/geany/geany-plugins.git
 cd geany-plugins
 ./autogen.sh --prefix=/somedirectory/geany
 --with-geany-libdir=/somedirectory/geany/lib
 make install
 cd ../bin
 ./geany -c ../config

 and you have the plugins.  Note there is no sudo in the above so you
 can't touch the system install by accident.

 For further information see the HACKING file.

 Cheers
 Lex

 On 9 March 2015 at 04:36, Volodymyr Kononenko vmkonone...@gmail.com
 wrote:
  Hi all,
 
  I have received several bugreports about PairTagHighlighter plugin. The
  subject is described on Github.
  While debugging I see that plugin is trying to clear highlighting on
  appropriate ranges, but nothing happens after SCI_INDICATORCLEARRANGE.
 BTW,
  I've checked, that clearing range is called for the correct indicator.
 
  The issue is not reproducible on 1.23.1, while on 1.24.1 it has stable
  reproducibility.
 
  I've found the issue in Scintilla, which I suppose is related to subject.
  This issue was fixed in Scintilla after 3.4.2. In Geany codebase
 Scintilla
  was updated to 3.4.4 with 46affaf commit. I want to check if the issue is
  reproducible on this revision and one revision before.
 
  Please, tell me how to build a certain version of Geany and plugin for
 it,
  because my playing with --with-geany-libdir and --prefix was
 unsuccessful.
 
  If you have another ideas why the issue could happen, please let me know.
  Thanks in advance!
 
 
  --
  Best regards,
  Volodymyr Kononenko
  http://kononenko.ws
 
  ___
  Devel mailing list
  Devel@lists.geany.org
  https://lists.geany.org/cgi-bin/mailman/listinfo/devel
 
 ___
 Devel mailing list
 Devel@lists.geany.org
 https://lists.geany.org/cgi-bin/mailman/listinfo/devel




-- 
Best regards,
Volodymyr Kononenko
http://kononenko.ws
___
Devel mailing list
Devel@lists.geany.org
https://lists.geany.org/cgi-bin/mailman/listinfo/devel


Re: [Geany-Devel] PairTagHighlighter / Not auto clear previous highlight when click other tag

2015-03-09 Thread Colomban Wendling
Hi,

tl;dr: I found the issue in the end, which is in a call from the plugin.
 Here below is my train of responses because they still are of some
interest, but you can skip directly to the last paragraph.

Le 09/03/2015 14:48, Volodymyr Kononenko a écrit :
 A search with git bisect has shown, that the bug was introduced with
 updating Scintilla to 3.3.2:
 
 […]
 
 Similar issue http://sourceforge.net/p/scintilla/bugs/1604/ I've found
 on Scintilla bug tracker was fixed only for win32 - here is the patch
 http://sourceforge.net/p/scintilla/code/ci/23f89aef53c7ab73bdd45ae1302b97698682e3cd.

I highly doubt it's anything like the same issue, because the one
described here is a redraw issue, which should get fixed when triggering
another redraw, like e.g. scrolling the offending part offscreen and
back, while the issues I see with pairtaghighlighter persist after
redraws (which means the indicators themselves are still here).

Moreover, clearing the indicators on the whole buffer:

 scintilla_send_message(sci, SCI_INDICATORCLEARRANGE, 0, sci_get_length(sci));

instead of only the range passed to the function fixes the issue for me,
so I would really bet on inappropriate clear range.

Which is indeed kind of weird because it really does work with 1.23 and
not 1.24, even with the very same plugin .so.

 I tried to detect the first Scintilla commit, which introduced the
 issue, but I see that merging Scintilla to Geany sources is non-trivial.
 Build failed after the first attempt.
 
 Folks, what do you think about it? Is it enough information that it is
 Scintilla issue and we need to report it or something was not taken into
 account during upgrading to 3.3.2?

Actually it's the plugin's SCI_INDICATORCLEARRANGE
 http://www.scintilla.org/ScintillaDoc.html#SCI_INDICATORCLEARRANGE
that is incorrect: the second parameter should be the *length* to clear,
not the end position.  Apparently earlier Scintilla versions were
forgiving on the range, but new ones aren't and do nothing with invalid
ranges.

I made you a PR fixing the issue:
https://github.com/geany/geany-plugins/pull/200


Regards,
Colomban
___
Devel mailing list
Devel@lists.geany.org
https://lists.geany.org/cgi-bin/mailman/listinfo/devel


Re: [Geany-Devel] PairTagHighlighter / Not auto clear previous highlight when click other tag

2015-03-09 Thread Colomban Wendling
Le 09/03/2015 17:40, Volodymyr Kononenko a écrit :
 Colomban,
 
 Really my fault (
 Thanks a lot for participation and detecting root cause! I've tested
 your patch, it fixes the issue.
 Thanks again!

You're welcome :)

 P.S. The only question, when the new version of geany-plugins is planned
 to be released?

That's something I was starting to talk about with Frank, and we didn't
yet plan anything but agreed it should be soonish (but it probably
means like 2 months).

We'll try and plan something and tell you guys.

Regards,
Colomban
___
Devel mailing list
Devel@lists.geany.org
https://lists.geany.org/cgi-bin/mailman/listinfo/devel


Re: [Geany-Devel] PairTagHighlighter / Not auto clear previous highlight when click other tag

2015-03-09 Thread Volodymyr Kononenko
Colomban,

Really my fault (
Thanks a lot for participation and detecting root cause! I've tested your
patch, it fixes the issue.
Thanks again!

P.S. The only question, when the new version of geany-plugins is planned to
be released?



On 9 March 2015 at 18:19, Colomban Wendling lists@herbesfolles.org
wrote:

 Hi,

 tl;dr: I found the issue in the end, which is in a call from the plugin.
  Here below is my train of responses because they still are of some
 interest, but you can skip directly to the last paragraph.

 Le 09/03/2015 14:48, Volodymyr Kononenko a écrit :
  A search with git bisect has shown, that the bug was introduced with
  updating Scintilla to 3.3.2:
 
  […]
 
  Similar issue http://sourceforge.net/p/scintilla/bugs/1604/ I've found
  on Scintilla bug tracker was fixed only for win32 - here is the patch
  
 http://sourceforge.net/p/scintilla/code/ci/23f89aef53c7ab73bdd45ae1302b97698682e3cd
 .

 I highly doubt it's anything like the same issue, because the one
 described here is a redraw issue, which should get fixed when triggering
 another redraw, like e.g. scrolling the offending part offscreen and
 back, while the issues I see with pairtaghighlighter persist after
 redraws (which means the indicators themselves are still here).

 Moreover, clearing the indicators on the whole buffer:

  scintilla_send_message(sci, SCI_INDICATORCLEARRANGE, 0,
 sci_get_length(sci));

 instead of only the range passed to the function fixes the issue for me,
 so I would really bet on inappropriate clear range.

 Which is indeed kind of weird because it really does work with 1.23 and
 not 1.24, even with the very same plugin .so.

  I tried to detect the first Scintilla commit, which introduced the
  issue, but I see that merging Scintilla to Geany sources is non-trivial.
  Build failed after the first attempt.
 
  Folks, what do you think about it? Is it enough information that it is
  Scintilla issue and we need to report it or something was not taken into
  account during upgrading to 3.3.2?

 Actually it's the plugin's SCI_INDICATORCLEARRANGE
  http://www.scintilla.org/ScintillaDoc.html#SCI_INDICATORCLEARRANGE
 that is incorrect: the second parameter should be the *length* to clear,
 not the end position.  Apparently earlier Scintilla versions were
 forgiving on the range, but new ones aren't and do nothing with invalid
 ranges.

 I made you a PR fixing the issue:
 https://github.com/geany/geany-plugins/pull/200


 Regards,
 Colomban
 ___
 Devel mailing list
 Devel@lists.geany.org
 https://lists.geany.org/cgi-bin/mailman/listinfo/devel




-- 
Best regards,
Volodymyr Kononenko
http://kononenko.ws
___
Devel mailing list
Devel@lists.geany.org
https://lists.geany.org/cgi-bin/mailman/listinfo/devel


Re: [Geany-Devel] PairTagHighlighter / Not auto clear previous highlight when click other tag

2015-03-09 Thread Frank Lanitz
Am 09.03.2015 um 17:40 schrieb Volodymyr Kononenko:
 Thanks a lot for participation and detecting root cause! I've tested
 your patch, it fixes the issue.


Just merged the PR.


Cheers,
Frank



signature.asc
Description: OpenPGP digital signature
___
Devel mailing list
Devel@lists.geany.org
https://lists.geany.org/cgi-bin/mailman/listinfo/devel


Re: [Geany-Devel] PairTagHighlighter / Not auto clear previous highlight when click other tag

2015-03-09 Thread Volodymyr Kononenko
Thanks Frank!

On 9 March 2015 at 22:37, Frank Lanitz fr...@frank.uvena.de wrote:

 Am 09.03.2015 um 17:40 schrieb Volodymyr Kononenko:
  Thanks a lot for participation and detecting root cause! I've tested
  your patch, it fixes the issue.


 Just merged the PR.


 Cheers,
 Frank


 ___
 Devel mailing list
 Devel@lists.geany.org
 https://lists.geany.org/cgi-bin/mailman/listinfo/devel




-- 
Best regards,
Volodymyr Kononenko
http://kononenko.ws
___
Devel mailing list
Devel@lists.geany.org
https://lists.geany.org/cgi-bin/mailman/listinfo/devel