diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-07-27 21:20:38 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-07-27 21:20:38 +0200 |
commit | b98c77229dbdac7b044c7b41b7fa79bb260b7b19 (patch) | |
tree | b788ba17297f6b89f5d2fa92c59855870ef816f9 /Applications | |
parent | 6a0319697c554e54f5a6b3a2a78d82e7cc073d55 (diff) | |
download | serenity-b98c77229dbdac7b044c7b41b7fa79bb260b7b19.zip |
TextEditor: Let's have line numbers starting at 1.
Thanks to Dan for pointing this out on IRC:
<danboid> I see TextEditor still numbers its lines from 0. You're too much of a programmer sometimes kling! :)
< kling> that might be the most extreme form of "programmer design" I've seen in serenity
Diffstat (limited to 'Applications')
-rw-r--r-- | Applications/TextEditor/TextEditorWidget.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Applications/TextEditor/TextEditorWidget.cpp b/Applications/TextEditor/TextEditorWidget.cpp index 3d5135fd7e..91f25f6384 100644 --- a/Applications/TextEditor/TextEditorWidget.cpp +++ b/Applications/TextEditor/TextEditorWidget.cpp @@ -25,7 +25,7 @@ TextEditorWidget::TextEditorWidget() m_editor->on_cursor_change = [statusbar, this] { StringBuilder builder; - builder.appendf("Line: %d, Column: %d", m_editor->cursor().line(), m_editor->cursor().column()); + builder.appendf("Line: %d, Column: %d", m_editor->cursor().line() + 1, m_editor->cursor().column()); statusbar->set_text(builder.to_string()); }; |