[vte] a11y: Fix caret position when the cursor is at the top left of the terminal
- From: Egmont Koblinger <egmontkob src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte] a11y: Fix caret position when the cursor is at the top left of the terminal
- Date: Sun, 1 Feb 2015 19:40:15 +0000 (UTC)
commit 143de2bfe40a33424991944202e9c3b25c3a0b01
Author: Samuel Thibault <samuel thibault ens-lyon org>
Date: Sun Feb 1 20:37:42 2015 +0100
a11y: Fix caret position when the cursor is at the top left of the terminal
https://bugzilla.gnome.org/show_bug.cgi?id=166637
src/vteaccess.c | 8 +-------
1 files changed, 1 insertions(+), 7 deletions(-)
---
diff --git a/src/vteaccess.c b/src/vteaccess.c
index 9cb1ed4..d445e43 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]