Added option to change the caret width.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1408 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Enrico Tröger 2007-03-20 18:15:07 +00:00
parent 2c556d78f3
commit 637d862881
4 changed files with 24 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2007-03-20 Enrico Tröger <enrico.troeger@uvena.de>
* data/filetypes.common, doc/geany.docbook, src/highlighting.c:
Added option to change the caret width.
2007-03-15 Nick Treleaven <nick.treleaven@btinternet.com>
* src/keybindings.c, src/keybindings.h, src/sciwrappers.c,

View File

@ -23,6 +23,10 @@ current_line=0x0;0xf0f0f0;true;false
# colour of the caret(the blinking cursor), only first argument is interpreted
caret=0x000000;0x0;false;false
# width of the caret(the blinking cursor), only first argument is interpreted
# width in pixels, use 0 to make it invisible, maximum width is 3
caret_width=1;0;false;false
# set foreground and background colour of indentation guides
indent_guide=0xc0c0c0;0xffffff;false;false

View File

@ -1806,6 +1806,15 @@
</entry>
<entry>caret=0x000000;0x0;false;false</entry>
</row>
<row>
<entry>caret_width</entry>
<entry>The width for the caret(the blinking cursor).
Only the first argument is interpreted. The width is
specified in pixels with a maximum of three pixel.
Use the width 0 to make the caret invisible.
</entry>
<entry>caret=1;0;false;false</entry>
</row>
<row>
<entry>current_line</entry>
<entry>The style for colouring the background of the current

View File

@ -410,6 +410,9 @@ static void styleset_common_init(void)
get_keyfile_int(config, config_home, "styling", "folding_horiz_line",
0, 0, &tmp_style);
common_style_set.folding_style.draw_line = tmp_style.foreground;
get_keyfile_int(config, config_home, "styling", "caret_width",
1, 0, &tmp_style);
common_style_set.styling[GCS_CARET].background = tmp_style.foreground;
}
get_keyfile_wordchars(config, config_home, &common_style_set.wordchars);
@ -435,8 +438,9 @@ void styleset_common(ScintillaObject *sci, gint style_bits)
SSM(sci, SCI_STYLECLEARALL, 0, 0);
// caret colour
// caret colour and width
SSM(sci, SCI_SETCARETFORE, invert(common_style_set.styling[GCS_CARET].foreground), 0);
SSM(sci, SCI_SETCARETWIDTH, common_style_set.styling[GCS_CARET].background, 0);
// colourize the current line
SSM(sci, SCI_SETCARETLINEBACK, invert(common_style_set.styling[GCS_CURRENT_LINE].background), 0);