summaryrefslogtreecommitdiff
path: root/Libraries
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-07-27 21:20:38 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-07-27 21:20:38 +0200
commitb98c77229dbdac7b044c7b41b7fa79bb260b7b19 (patch)
treeb788ba17297f6b89f5d2fa92c59855870ef816f9 /Libraries
parent6a0319697c554e54f5a6b3a2a78d82e7cc073d55 (diff)
downloadserenity-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 'Libraries')
-rw-r--r--Libraries/LibGUI/GTextEditor.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Libraries/LibGUI/GTextEditor.cpp b/Libraries/LibGUI/GTextEditor.cpp
index 468495af9e..60b0c703e6 100644
--- a/Libraries/LibGUI/GTextEditor.cpp
+++ b/Libraries/LibGUI/GTextEditor.cpp
@@ -292,7 +292,7 @@ void GTextEditor::paint_event(GPaintEvent& event)
auto ruler_line_rect = ruler_content_rect(i);
painter.draw_text(
ruler_line_rect.shrunken(2, 0),
- String::number(i),
+ String::number(i + 1),
is_current_line ? Font::default_bold_font() : font(),
TextAlignment::CenterRight,
is_current_line ? Color::DarkGray : Color::MidGray);