6347 Commits

Author SHA1 Message Date
Colomban Wendling
effc8ef86f Add proper scope for JS tags including their own context
This makes `Foo.bar = function()` properly report a function tag "bar"
with scope "Foo" rather than a function tag "Foo.bar" with no scope.

Part of #3570192.
2012-09-24 12:25:36 +02:00
Colomban Wendling
be45924f7c JavaScript parser: don't set token position information again and again
There is no need to set the token position information in the loop
searching for the initial token character, simply do that when we
finally found the token start.
2012-09-22 18:13:07 +02:00
Colomban Wendling
772509e898 ctags: fix improper use of "const" type qualifier
The external declaration of "File" in read.h (defined in read.c) was
improperly tagged as "const" for it not to be modifiable outside of
read.c.  Although it is good to protect this global variable against
improper modification, the use of "const" here makes it perfectly valid
for the compiler to assume that the fields in this structure never
changes during runtime, thus allowing it to do optimizations on this
assumption.  However, this assumption is wrong because this structure
actually gets modified by many read.c's functions, and thus possibly
lead to improper and unexpected behavior if the compiler sees a window
for optimizing fields access.

Moreover, protecting "File" as it was with the "const" type qualifier
required a hack to be able to include read.h in read.c since "const"
and non-"const" declarations conflicts.

Actually, at least the JavaScript parser did suffer of the issue,
because it calls getSourceLineNumber() macro (expanding to a direct
"File" member access) several times in one single function, making it
easy for the compilers to cache the value as an optimization.  Both GCC
and CLang showed this behavior with optimization enabled.  As a result,
the line numbers of JavaScript tags were often incorrect.
2012-09-22 17:52:29 +02:00
Lex Trotman
9ef34bbe0c Fix pointer warning
GCC 4.7.1 gives a incompatible pointer warning because gtk_adjustment_new
returns a GObject* not a GtkAdjustment* (new compiler default).
2012-09-22 16:05:51 +10:00
Lex Trotman
5ef6e1627c Fix multiline comments at end of file
Multiline comments did not work at end of file because there is no
style there so also check if at end of file as well as style.
Closes #3026691
2012-09-22 14:13:14 +10:00
Lex Trotman
fbb89f523a Remove illegal signal handling
The SIGTERM handler called the standard exit callback which uses
functions that are illegal in signal handlers.  Commented out as
a prelude to full removal if no use case can be made.
2012-09-22 13:40:33 +10:00
Lex Trotman
e5e3760157 Use faster squiggle underlining
Geany performance suffered with a lot of error underlining visible.
Matthew Brush developed an improved implementation that was accepted
into Scintilla, this selects that implementation.
2012-09-22 12:47:29 +10:00
Colomban Wendling
877b0477c4 Set scope information for JavaScript tags
Instead of adding the scope to the tag name, properly add it as the
tag's scope.

Closes #3570192.
2012-09-22 01:27:11 +02:00
Colomban Wendling
2d83a85eb7 Update NEWS for a few recently fixed bugs 2012-09-17 23:15:11 +02:00
Colomban Wendling
b886ac1b2e Merge branch 'improve-scope-detection' 2012-09-17 22:59:52 +02:00
Colomban Wendling
8289e8f962 Report scope including classes, namespaces and alike
Don't only match the current function as the current scope, but also
classes, namespaces and others containers.

Closes #1996778.
2012-09-17 22:51:36 +02:00
Colomban Wendling
491a45f614 Improve symbols_get_current_function() a lot and make it more flexible
Finding the current function now better handles the case the current
line is after a function but outside its scope, and many other issues
the scope reporting had.
2012-09-17 22:50:32 +02:00
Colomban Wendling
9d2dab8fcf Fix an off-by-one issue in sci_get_position_from_line()
Scintilla counts lines from 0 but TagManager from 1, so convert them.
2012-09-17 20:22:52 +02:00
Colomban Wendling
d83bd40938 Add tm_get_current_tag() 2012-09-17 20:07:45 +02:00
Colomban Wendling
afb1eaaa01 Remove improper caching of the current function
The code assumed that if both old and new fold levels were above the
minimal function fold level the function couldn't have been changed,
which is wrong if a function can appear both inside and outside another
fold level (e.g. inside or outside a class).
2012-09-17 14:44:33 +02:00
Colomban Wendling
adbd162c7b Also consider tags up to date if realtime parsing is active
This makes symbols_get_current_function() more accurate by using TM
data even on a modified file if realtime tag parsing is enabled, thus
if the data has reasonable chances to be correct.
2012-09-17 14:44:33 +02:00
Colomban Wendling
1cfa44ff62 Make tm_get_current_function() find methods too 2012-09-17 14:44:33 +02:00
Colomban Wendling
eed6e25a0e Don't duplicate the kind names and letters 2012-09-17 14:44:33 +02:00
Colomban Wendling
022524ba26 Report Python class methods as methods rather than members
This makes the Python kinds more consistent with other parsers and
allows to find Python methods when filtering on tm_tag_method_t.
2012-09-17 14:44:32 +02:00
Colomban Wendling
17396aaa99 Fix a memory leak in tm_get_current_function() 2012-09-17 14:44:32 +02:00
Frank Lanitz
2e725999cc Merge update of Russian translation from m1kc. 2012-09-16 21:58:05 +02:00
Colomban Wendling
df3d35dab1 No need to update GdkDragContext:action
Updating GdkDragContext:action is not needed and this field is private
anyway.
2012-09-16 00:28:46 +02:00
Colomban Wendling
b58995c9fc Don't access private field GtkNotebook::event_window 2012-09-16 00:26:43 +02:00
m1kc
e020b04754 Fix the rest of the Russian strings. 2012-09-16 00:03:13 +04:00
m1kc
978f770398 Fix some more Russian strings. 2012-09-15 22:31:14 +04:00
m1kc
d807eff73d Fix some Russian strings. 2012-09-15 19:52:16 +02:00
Frank Lanitz
987c13e26f Added Basque translation provied by Asier Iturralde Sarasola 2012-09-15 19:10:53 +02:00
m1kc
8427ab08c2 Fix some Russian strings. 2012-09-15 13:50:36 +04:00
Colomban Wendling
f1e88ca311 Ruby parser: don't create an extra scope after "for .. in .. do"
When "do" appears as the separator after a "for", "while" or "until"
construct, don't improperly make it start its own scope too.
2012-09-13 16:34:18 +02:00
Colomban Wendling
faeeaf4bd2 Check the VTE library we're loading actually have all symbols we need
This prevents a crash if the VTE library we happen to load lacks a
symbol we need, which can happen e.g. if the user passed an improper
library to the --vte-lib command-line option or if the VTE library is
loadable but broken.
2012-09-13 16:34:18 +02:00
Colomban Wendling
da5bb7f0e1 Don't access GtkColorSelectionDialog fields directly
Also don't hack around and handle clicks on the dialog's buttons but
rather simply handler the dialog's response.
2012-09-13 16:34:18 +02:00
Colomban Wendling
72db3a711e Don't use deprecated GtkObject 2012-09-13 16:34:18 +02:00
Colomban Wendling
96afed1e9c Don't access GtkFontSelectionDialog fields directly
Also don't hack around and handle clicks on the dialog's buttons but
rather simply handler the dialog's response.
2012-09-13 16:34:18 +02:00
Colomban Wendling
49f6ebbd0a Don't use gtk_widget_hide_all(), deprecated in 2.24 2012-09-13 16:34:18 +02:00
Colomban Wendling
926744b4b7 Don't use pre-GObject types and macros 2012-09-13 16:34:18 +02:00
Colomban Wendling
8b181f7c79 Don't access GtkSelectionData fields directly 2012-09-13 16:34:18 +02:00
Colomban Wendling
593fef7fa0 Don't access GtkWidget:parent directly 2012-09-13 16:34:18 +02:00
Colomban Wendling
c7f6997361 Don't access GtkNotebook fields directly 2012-09-13 16:34:18 +02:00
Colomban Wendling
2d878c8a5d Don't use deprecated GtkNotebookPage 2012-09-13 16:34:18 +02:00
Colomban Wendling
4d16735380 Don't access GtkDialog fields directly 2012-09-13 16:34:18 +02:00
Colomban Wendling
3b14cca451 Don't use long-deprecated gtk_widget_{ref,unref}() 2012-09-13 16:34:18 +02:00
Colomban Wendling
5ada77df70 Don't use deprecated gtk_box_pack_start_defaults() 2012-09-13 16:34:18 +02:00
Enrico Tröger
9f479b861a Regenerate Python tag list
Generated against a clean Python 2.7 installation.
2012-09-12 19:30:56 +02:00
Enrico Tröger
baafa6325c Strip more tags which start with a keyword 2012-09-12 19:29:21 +02:00
Enrico Tröger
8171af611f Don't set the focus to the editor widget when clicking a symbol while holding Control
When clicking a symbol in the Symbols sidebar and holding the Control modifier key, don't
set the focus to the editor widget so further navigation in the Symbols sidebar with keys
is possible.
2012-09-09 16:05:58 +02:00
Colomban Wendling
49dafc8536 Use namespaces icon for Ruby modules
It's not perfect but better than nothing since other tags have icons.
2012-09-06 20:43:49 +02:00
Colomban Wendling
8f0ddfe4ef Merge branch 'printing-with-scintilla'
Closes #3475444, #2804000 and #2629121.
2012-09-06 18:45:26 +02:00
Nick Treleaven
a5edf57a17 Don't regenerate deps.mak files on 'make clean' (Windows makefile) 2012-09-06 14:52:31 +01:00
Nick Treleaven
00714db69c Improve collapsing fold behaviour when start point is offscreen
When collapsing a fold range whose starting line is offscreen,
scroll the starting line to display at the top of the view.
Otherwise it can be confusing when the document scrolls down to hide
the folded lines.
2012-09-05 17:13:34 +01:00
Colomban Wendling
654f07219f Update Scintilla to version 3.2.2 2012-09-05 00:37:41 +02:00