Skip to content

Commit

Permalink
position (row,column) of the cursor in statusbar - improved
Browse files Browse the repository at this point in the history
  • Loading branch information
giuspen committed Jun 14, 2024
1 parent 0069bc1 commit e0b77bc
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/ct/ct_column_edit.cc
Original file line number Diff line number Diff line change
Expand Up @@ -519,11 +519,13 @@ void CtColumnEdit::focus_in()
void CtColumnEdit::selection_update()
{
const Gdk::Point cursorPlace = _get_cursor_place();
if (_newCursorRowColCallback) {
_newCursorRowColCallback(cursorPlace.get_y()+1, cursorPlace.get_x());
}
else {
spdlog::debug("{} {},{}", __FUNCTION__, cursorPlace.get_y()+1, cursorPlace.get_x());
if (_textView.has_focus()) {
if (_newCursorRowColCallback) {
_newCursorRowColCallback(cursorPlace.get_y()+1, cursorPlace.get_x());
}
else {
spdlog::debug("{} {},{}", __FUNCTION__, cursorPlace.get_y()+1, cursorPlace.get_x());
}
}
Glib::RefPtr<Gtk::TextBuffer> rTextBuffer = _textView.get_buffer();
if (not rTextBuffer->get_has_selection()) {
Expand Down

0 comments on commit e0b77bc

Please sign in to comment.