[gnome-builder] lsp: bump version number
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] lsp: bump version number
- Date: Fri, 22 Nov 2019 22:39:36 +0000 (UTC)
commit c47d3a73e3eda57b943d7c99bb33f6a5a979ff0c
Author: Christian Hergert <chergert redhat com>
Date: Fri Nov 22 14:38:26 2019 -0800
lsp: bump version number
We always want to bump this an extra value because we haven't yet committed
the text change to the underlying buffer (which is what will increment the
change count).
src/libide/lsp/ide-lsp-client.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/libide/lsp/ide-lsp-client.c b/src/libide/lsp/ide-lsp-client.c
index 7875c561b..cf81560b7 100644
--- a/src/libide/lsp/ide-lsp-client.c
+++ b/src/libide/lsp/ide-lsp-client.c
@@ -189,7 +189,9 @@ ide_lsp_client_buffer_insert_text (IdeLspClient *self,
copy = g_strndup (new_text, len);
uri = ide_buffer_dup_uri (buffer);
- version = (gint64)ide_buffer_get_change_count (buffer);
+
+ /* We get called before this change is registered */
+ version = (gint64)ide_buffer_get_change_count (buffer) + 1;
line = gtk_text_iter_get_line (location);
column = gtk_text_iter_get_line_offset (location);
@@ -251,7 +253,9 @@ ide_lsp_client_buffer_delete_range (IdeLspClient *self,
g_assert (IDE_IS_BUFFER (buffer));
uri = ide_buffer_dup_uri (buffer);
- version = (gint)ide_buffer_get_change_count (buffer);
+
+ /* We get called before this change is registered */
+ version = (gint)ide_buffer_get_change_count (buffer) + 1;
copy_begin = *begin_iter;
copy_end = *end_iter;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]