1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-12-24 20:13:00 +03:00

lines and columns used for user interaction are 1-indexed

This commit is contained in:
Maxime Coste 2011-10-27 14:27:39 +00:00
parent 55cd4949e0
commit 0e18db5a88
3 changed files with 3 additions and 3 deletions

View File

@ -123,7 +123,7 @@ void show_line_numbers(DisplayBuffer& display_buffer)
Color::Black, Color::White));
char buffer[6];
snprintf(buffer, 6, "%3d ", coord.line);
snprintf(buffer, 6, "%3d ", coord.line + 1);
display_buffer.replace_atom_content(atom_it, buffer);
}
}

View File

@ -321,7 +321,7 @@ void do_go(Window& window, int count)
if (count != 0)
{
BufferIterator target =
window.buffer().iterator_at(BufferCoord(count, 0));
window.buffer().iterator_at(BufferCoord(count-1, 0));
window.move_cursor_to(target);
}

View File

@ -370,7 +370,7 @@ std::string Window::status_line() const
oss << m_buffer.name();
if (m_buffer.is_modified())
oss << " [+]";
oss << " -- " << cursor.line << "," << cursor.column
oss << " -- " << cursor.line+1 << "," << cursor.column+1
<< " -- " << m_selections.size() << " sel -- ";
if (m_current_inserter)
oss << "[Insert]";