SF.net SVN: geany: [969] trunk
eht16 at users.sourceforge.net
eht16 at xxxxx
Sun Nov 5 21:20:28 UTC 2006
Revision: 969
http://svn.sourceforge.net/geany/?rev=969&view=rev
Author: eht16
Date: 2006-11-05 13:20:22 -0800 (Sun, 05 Nov 2006)
Log Message:
-----------
Fixed (hopefully) wrong indentation in some cases when inserting '}'.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/sci_cb.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2006-11-04 22:38:11 UTC (rev 968)
+++ trunk/ChangeLog 2006-11-05 21:20:22 UTC (rev 969)
@@ -1,3 +1,9 @@
+2006-11-05 Enrico Tröger <enrico.troeger at uvena.de>
+
+ * src/sci_cb.c: Fixed (hopefully) wrong indentation in some cases when
+ inserting '}'.
+
+
2006-11-04 Enrico Tröger <enrico.troeger at uvena.de>
* src/highlighting.c, src/highlighting.h:
@@ -3,5 +9,5 @@
Applied patch from Bob Doan to do not set keywords for XML
documents(thanks).
- Made styleset_markup() static.
+ Made styleset_markup() static.
@@ -15,8 +21,8 @@
* src/filetypes.c, data/filetype_extensions.conf:
Recognise *.xsl, *.xslt filenames for XML filetype.
Recognise 'GNUmakefile' filename for Make filetype.
-
+
2006-11-03 Nick Treleaven <nick.treleaven at btinternet.com>
* src/msgwindow.c:
Modified: trunk/src/sci_cb.c
===================================================================
--- trunk/src/sci_cb.c 2006-11-04 22:38:11 UTC (rev 968)
+++ trunk/src/sci_cb.c 2006-11-05 21:20:22 UTC (rev 969)
@@ -316,7 +316,7 @@
/// TODO add something like insert_tabs() which inserts a tab or tab_width times a space
sci_add_text(sci, "\t");
}
-
+
}
// " * " auto completion in multiline C/C++ comments
sci_cb_auto_multiline(sci, pos);
@@ -452,15 +452,18 @@
//geany_debug("line_len: %d eol: %d cnt: %d", line_len, eol_char_len, cnt);
if ((line_len - eol_char_len - 1) != cnt) return;
- if (start_brace >= 0) sci_cb_get_indent(sci, start_brace, TRUE);
/* geany_debug("pos: %d, start: %d char: %c start_line: %d", pos, start_brace,
sci_get_char_at(sci, pos), sci_get_line_from_position(sci, start_brace));
*/
- text = g_strconcat(indent, "}", NULL);
- sci_set_anchor(sci, line_start);
- SSM(sci, SCI_REPLACESEL, 0, (sptr_t) text);
- g_free(text);
+ if (start_brace >= 0)
+ {
+ sci_cb_get_indent(sci, start_brace, TRUE);
+ text = g_strconcat(indent, "}", NULL);
+ sci_set_anchor(sci, line_start);
+ SSM(sci, SCI_REPLACESEL, 0, (sptr_t) text);
+ g_free(text);
+ }
}
@@ -474,7 +477,7 @@
if (pos == -1)
pos = sci_get_current_position(sci);
-
+
line = sci_get_line_from_position(sci, pos);
line_start = sci_get_position_from_line(sci, line);
startword = pos - line_start;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Commits
mailing list