Regular expressions might match empty ranges, which weren't handled
properly, but generally simply omitted.
For example, the regular expression "^$" (empty line) never matched
because we assumed empty results were not interesting, and actually
needed more care in the code. Alike, an expression matching only on
its lookahead part, like "a?(?=b)" against "b", would stop further
search, although it could even match a non-empty range if "ab" is
present later in the input. This last kind of expressions also lead
to double-replacement because they first matched "ab" and then "b"
alone when re-matching after the "a" replacement.
This commit fixes:
* searching when the matched range is empty;
* step-by-step search when matching an empty range;
* double replacement when the pattern re-matches an empty range
straight after a replacement;
* replacement to and empty string when the matching an empty range.
A know issue though is the step-by-step replacement that won't replace
an empty match but rather find the next match.
If a search matched the very last character of the document, next
search attempt started out of the document bounds. This even lead
to an infinite loop due to an improper sanity check.
By the way, this fixes matching of contiguous results, as the next
search used to improperly skip one character after the result.
Although this looks like a huge issue, it was actually visible almost
only on the match count since the whole matching line was printed.
Use the current document's directory unless the directory field has
already been edited and the current document has not changed.
Otherwise, prepend the current document's directory to the drop-down
history in case it is wanted.
This is useful to avoid losing the edited directory when it is less
likely the user wants to use the current document's directory.
Previously it was using a GLIB assertion which shouldn't be used
to detect a normal condition and so it caused a warning on the
console output when clicking "Reload" with an "untitled" document.
We explicitly use GModule's .pc since 7b2f0fe, and it provides the
appropriate flag: we don't need to add it ourselves anymore. Moreover,
since this flag is not needed (nor available) on all platforms (e.g.
Windows or MacOS X), it is safer to let GModule deal with adding it
anyway.
Scintilla deprecated SCI_GETUSEPALETTE and SCI_SETUSEPALETTE messages,
and since we don't build with deprecated API support they aren't
available anymore.
This moves CTags files into their own subdirectory and moves the
tagmanager source and header files into their own subdirectory.
The bulk of the work was done by Colomban.
The export plugin uses the pow() function from libm without linking against
it. It has worked so far because Geany itself has a link against libm, but
should that be removed in the future, this would fail to resolve symbols.
Signed-off-by: Chow Loong Jin <hyperair@debian.org>
Signed-off-by: Colomban Wendling <ban@herbesfolles.org>
Automake provides dist-bzip2 since at least version 1.8, so remove our
own target. Moreover bzip2 distributions are a little obsolescent now
Xz is available and spread enough.