summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2015-02-01 20:37:42 +0100
committerEgmont Koblinger <egmont@gmail.com>2015-02-01 20:38:55 +0100
commit143de2bfe40a33424991944202e9c3b25c3a0b01 (patch)
tree656a0882be6aabe89935bfac67fcacee07ad2106
parent1ab98077cadd4a54bb9f1f963690b4b1bda1ba7e (diff)
downloadvte-143de2bfe40a33424991944202e9c3b25c3a0b01.tar.gz
a11y: Fix caret position when the cursor is at the top left of the terminal
https://bugzilla.gnome.org/show_bug.cgi?id=166637
-rw-r--r--src/vteaccess.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/vteaccess.c b/src/vteaccess.c
index 9cb1ed48..d445e43e 100644
--- a/src/vteaccess.c
+++ b/src/vteaccess.c
@@ -341,7 +341,7 @@ vte_terminal_accessible_update_private_data_if_needed(VteTerminalAccessible *acc
"Cursor at (%ld, " "%ld).\n", ccol, crow);
/* Get the offsets to the beginnings of each line. */
- caret = -1;
+ caret = 0;
for (i = 0; i < priv->snapshot_characters->len; i++) {
/* Get the attributes for the current cell. */
offset = g_array_index(priv->snapshot_characters,
@@ -357,12 +357,6 @@ vte_terminal_accessible_update_private_data_if_needed(VteTerminalAccessible *acc
}
}
- /* If no cells are before the caret, then the caret must be
- * at the end of the buffer. */
- if (caret == -1) {
- caret = priv->snapshot_characters->len;
- }
-
/* Notify observers if the caret moved. */
if (caret != priv->snapshot_caret) {
priv->snapshot_caret = caret;