Branch: refs/heads/master Author: Eugene Arshinov earshinov@gmail.com Committer: elextr elextr@gmail.com Date: Sun, 21 Apr 2013 01:45:09 UTC Commit: 40fb3aa64dba110b8c0d97676dc7c6045c465c3a https://github.com/geany/geany/commit/40fb3aa64dba110b8c0d97676dc7c6045c465c...
Log Message: ----------- rewrite_reflow: Create `sci_get_position_from_col` function to wrap Scintilla's SCI_FINDCOLUMN command.
Modified Paths: -------------- src/editor.c src/sciwrappers.c src/sciwrappers.h
Modified: src/editor.c 2 files changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -599,7 +599,7 @@ static void check_line_breaking(GeanyEditor *editor, gint pos, gchar c) last_pos = sci_get_line_end_position(sci, line); last_col = sci_get_col_from_position(sci, last_pos); /* get last column on line */ /* last column - distance is the desired column, then retrieve its document position */ - pos = SSM(sci, SCI_FINDCOLUMN, line, last_col - diff); + pos = sci_get_position_from_col(sci, line, last_col - diff); sci_set_current_position(sci, pos, FALSE); sci_scroll_caret(sci); return;
Modified: src/sciwrappers.c 6 files changed, 6 insertions(+), 0 deletions(-) =================================================================== @@ -375,6 +375,12 @@ gint sci_get_col_from_position(ScintillaObject *sci, gint position) }
+gint sci_get_position_from_col(ScintillaObject *sci, gint line, gint col) +{ + return (gint) SSM(sci, SCI_FINDCOLUMN, line, col); +} + + /** Gets the position for the start of @a line. * @param sci Scintilla widget. * @param line Line.
Modified: src/sciwrappers.h 1 files changed, 1 insertions(+), 0 deletions(-) =================================================================== @@ -60,6 +60,7 @@ gint sci_marker_previous (ScintillaObject *sci, gint line, gint marker_mask, gboolean wrap);
gint sci_get_col_from_position (ScintillaObject *sci, gint position); +gint sci_get_position_from_col (ScintillaObject *sci, gint line, gint col); gint sci_get_line_from_position (ScintillaObject *sci, gint position); gint sci_get_position_from_line (ScintillaObject *sci, gint line); gint sci_get_current_position (ScintillaObject *sci);
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).