Skip to content

Commit

Permalink
Tweak the script editor's line/column indicator for readability
Browse files Browse the repository at this point in the history
- Use a colon instead of parentheses and a comma to reduce visual
  clutter.
- Pad the line number with 4 spaces to account for scripts longer
  than 999 lines.
  • Loading branch information
Calinou committed Sep 14, 2021
1 parent 3d577f0 commit 1e8976f
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions editor/code_editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -834,11 +834,9 @@ void CodeTextEditor::_line_col_changed() {
}

StringBuilder sb;
sb.append("(");
sb.append(itos(text_editor->get_caret_line() + 1).lpad(3));
sb.append(",");
sb.append(itos(text_editor->get_caret_line() + 1).lpad(4));
sb.append(" : ");
sb.append(itos(positional_column + 1).lpad(3));
sb.append(")");

line_and_col_txt->set_text(sb.as_string());
}
Expand Down

0 comments on commit 1e8976f

Please sign in to comment.