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:
Enrico Tröger 2005-12-09 01:34:32 +00:00
parent db2e7982ec
commit 0a153e2eb3
2 changed files with 13 additions and 0 deletions

View File

@ -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);
}
}

View File

@ -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);