[gnome-builder] buffer: track line deletions as part of line flags
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] buffer: track line deletions as part of line flags
- Date: Wed, 17 Feb 2016 03:10:23 +0000 (UTC)
commit 380e0be148e7f905c3c20635e6e1783e4be3e8c1
Author: Christian Hergert <chergert redhat com>
Date: Tue Feb 16 18:56:26 2016 -0800
buffer: track line deletions as part of line flags
I think there is still some work to be done in the Git line change tracker
when there are lots of moving parts. But this "good enough" to add
support for and fix the messy details later.
libide/ide-buffer.c | 3 +++
libide/ide-buffer.h | 7 ++++---
2 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/libide/ide-buffer.c b/libide/ide-buffer.c
index 4db9d58..a64baea 100644
--- a/libide/ide-buffer.c
+++ b/libide/ide-buffer.c
@@ -1484,6 +1484,9 @@ ide_buffer_get_line_flags (IdeBuffer *self,
break;
case IDE_BUFFER_LINE_CHANGE_DELETED:
+ flags |= IDE_BUFFER_LINE_FLAGS_DELETED;
+ break;
+
case IDE_BUFFER_LINE_CHANGE_NONE:
default:
break;
diff --git a/libide/ide-buffer.h b/libide/ide-buffer.h
index d6721dd..a421553 100644
--- a/libide/ide-buffer.h
+++ b/libide/ide-buffer.h
@@ -37,9 +37,10 @@ typedef enum
IDE_BUFFER_LINE_FLAGS_NONE = 0,
IDE_BUFFER_LINE_FLAGS_ADDED = 1 << 0,
IDE_BUFFER_LINE_FLAGS_CHANGED = 1 << 1,
- IDE_BUFFER_LINE_FLAGS_ERROR = 1 << 2,
- IDE_BUFFER_LINE_FLAGS_WARNING = 1 << 3,
- IDE_BUFFER_LINE_FLAGS_NOTE = 1 << 4,
+ IDE_BUFFER_LINE_FLAGS_DELETED = 1 << 2,
+ IDE_BUFFER_LINE_FLAGS_ERROR = 1 << 3,
+ IDE_BUFFER_LINE_FLAGS_WARNING = 1 << 4,
+ IDE_BUFFER_LINE_FLAGS_NOTE = 1 << 5,
} IdeBufferLineFlags;
struct _IdeBufferClass
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]