diff options
| author | Maxime Coste <mawww@kakoune.org> | 2016-12-26 22:10:25 +0000 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2016-12-26 22:10:25 +0000 |
| commit | fcd99d9c22b7187c764144ca2dadc2f6db485330 (patch) | |
| tree | 811717e776688df49edee5fe42822662d9b48dc8 /src | |
| parent | 25b1c32b096dd11dd68d37e44ef9a91661f3dc54 (diff) | |
Use absolute distance for relative line numbering
Closes #1068
Diffstat (limited to 'src')
| -rw-r--r-- | src/highlighters.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/highlighters.cc b/src/highlighters.cc index 21b557c4..3b761fcc 100644 --- a/src/highlighters.cc +++ b/src/highlighters.cc @@ -752,7 +752,7 @@ void show_line_numbers(const Context& context, HighlightFlags flags, const int line_to_format = (relative and not is_cursor_line) ? current_line - main_selection : current_line; char buffer[16]; - snprintf(buffer, 16, format, line_to_format); + snprintf(buffer, 16, format, std::abs(line_to_format)); DisplayAtom atom{buffer}; atom.face = (hl_cursor_line and is_cursor_line) ? face_absolute : face; line.insert(line.begin(), std::move(atom)); |
