If there was two hashes (#) in an inline comment, only the content
between the two was considered a comment.
X-Universal-CTags-Commit-ID: ee93f5b9f393e76a850cf8c894cc748a62981156
Most of the time there's no start of a string which means all the 10
strcmp()s are done for every character of the input. This is very expensive:
before this patch this function alone takes 55% of the parser time.
When comparing by character (and avoiding further comparison if the first
character doesn't match), this function takes only 11% of the parser time
so the performance of the parser nearly doubles.
In addition check for the "rb" prefix which is possible in Python 3.
Ported from universal-ctags.
Also, as changing the color of the label button doesn't currently work
on GTK2, but would on GTK3 with this change, explicitly skip it for
consistency.
Closes#528.
GtkScrolledWindow in GTK 3.16 might have a minimum and natural height
of 0 if GTK_OVERLAY_SCROLLING is enabled (which is the default), so we
need to fix our overridden minimal height to never be greater than the
natural height.
Do that by only changing the minimal height if it is greater than what
we want.
I don't know why we didn't use to set 0 here, but it might be that a
height of 0 caused problems on older GTK versions, so keep 1 to be sure.
X-Scintilla-Commit-ID: e9f9c964236a6b740f75d09a8b0ac76e5d6dd09f
Autodetect /etc/bash_completion (and the like)
Splitted up autodetection patterns for Bash
This will match:
- `*.bash` (any manufactured Bash scripts)
- `~/.bashrc` (hidden Bash configuration in your home directory)
- `~/.bash_*` (partials included by bashrc, e.g. `.bash_aliases`, `.bash_history`, `.bash_logout`)
- `/etc/bash.bashrc` (global Bash configuration)
- `/etc/bash_completion` (and potentially any other `/etc/bash_*` file)
This adds a "Filetype Configuration" under Tools->Configuration Files
with all filetype configuration files (grouped by language type).
This patch mostly reuses the stuff we already have in Geany - the menu
creation code from Document->Set Filetype, file creation in the .config
directory if it doesn't exist (similarly to filetypes.common) and config
file reloading when the file gets updated.
The character following an '@' was dropped if it didn't start a string
literal.
This could lead to unexpected problems if '@' was valid in other
situations.
X-Universal-CTags-Commit-ID: 2e62f475af1db08850447de46f56db14ce99d2eb
See http://www.open-std.org/jtc1/sc22/WG14/www/docs/n1256.pdf 6.4.6§3.
Note: This is not exactly the upstream Universal CTags commit because
it depends on another change for adding the `enter` label, which was
then included here.
X-Universal-CTags-Commit-ID: 3b3b60c7664a321a31ec87de336fc6bda90c405e
When tested with 200000 LOC python file (created by making many copies
of scripts/create_py_tags.py), the tm_tags_remove_file_tags() function
takes about 50% of the CPU time when only this file is open. After adding
the linear path to tm_tags_remove_file_tags() it takes just about 2%. See
the comment in the patch for more details.
Add API to truncate a vString to a certain length. This doesn't support
growing the string, only shrinking it.
X-Universal-CTags-Commit-ID: 4e3d9edf2e7a8a476ff97bc678e71c3919b960f9