added sci_get_current_line()
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@37 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
parent
db2e7982ec
commit
0a153e2eb3
@ -808,3 +808,15 @@ void sci_cmd(ScintillaObject * sci, gint cmd)
|
||||
{
|
||||
SSM(sci, cmd, 0, 0);
|
||||
}
|
||||
|
||||
gint sci_get_current_line(ScintillaObject *sci, gint pos)
|
||||
{
|
||||
if (pos >= 0)
|
||||
{
|
||||
return SSM(sci, SCI_LINEFROMPOSITION, pos, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
return SSM(sci, SCI_LINEFROMPOSITION, SSM(sci, SCI_GETCURRENTPOS, 0, 0), 0);
|
||||
}
|
||||
}
|
||||
|
@ -156,3 +156,4 @@ void sci_set_readonly (ScintillaObject * sci, gboolean readonly);
|
||||
gboolean sci_get_readonly (ScintillaObject * sci);
|
||||
gint sci_get_zoom (ScintillaObject * sci);
|
||||
void sci_cmd (ScintillaObject * sci, gint cmd);
|
||||
gint sci_get_current_line (ScintillaObject * sci, gint pos);
|
||||
|
Loading…
x
Reference in New Issue
Block a user