6608 Commits

Author SHA1 Message Date
Colomban Wendling
972b34e49a Keep caret and anchor position upon indent and unindent
Closes #3167355.
2012-09-28 16:19:06 +02:00
Frank Lanitz
d6bbdab166 Update of Basque translation 2012-09-26 21:07:59 +02:00
Frank Lanitz
00ccac5b78 Update of Italian translation 2012-09-25 19:58:39 +02:00
Colomban Wendling
bf233bc055 JavaScript parser: create class tag for variable with children methods
If we generated methods, properties or class children tags for a
variable, generate a class tag for the variable itself so the children
aren't orphaned.
2012-09-25 16:48:10 +02:00
Colomban Wendling
5df551b1ce JavaScript parser: fix parsing non-method properties
If a property value had more than one token, the parser choked on it
and failed to parse further properties of the object.  Fix that by
properly skipping the property's value.  If that value is a sub-object,
parse it recursively.

Closes #3470609.
2012-09-25 16:47:42 +02:00
Colomban Wendling
dc6e4f2723 JavaScript parser: lowercase "object" isn't a keyword
Closes #3036476.
2012-09-25 02:11:58 +02:00
Colomban Wendling
b9ca95c381 JavaScript parser: fix some unterminated statement corner case issues
This fixes parsing of the following unterminated statements:

	if () {
		foo = 42
	}

	if () {
		foo = new Object()
	}

	if () {
		foo = ({a:1,b:2})
	}
2012-09-25 01:31:11 +02:00
Colomban Wendling
205bab83d7 JavaScript parser: properly consume closing brace after a block in findCmdTerm() 2012-09-25 01:29:33 +02:00
Colomban Wendling
74890cc308 JavaScript parser: Simplify parseJfFile() code (no functional changes) 2012-09-24 19:51:37 +02:00
Colomban Wendling
297bca3799 JavaScript parser: Don't drop the token after an unbraced if
If an `if` haven't had braces, the code used to check itself for an
`else` after it, eating the next token if it wasn't actually an `else`.

So, drop the check for the else altogether since parseLine() handles
`else`s by calling parseIf() anyway.

This fixes constructs like:

	if (foo)
		bar();
	function baz() {
		// ...
	}

Closes #3568542.
2012-09-24 19:46:48 +02:00
Oleg Eterevsky
66888d580f In ctags JavaScript parser fix recognizing functions inside methods 2012-09-24 18:20:53 +02:00
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