[gtksourceview] view: remove useless checks
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview] view: remove useless checks
- Date: Sun, 16 Aug 2015 17:32:54 +0000 (UTC)
commit 611584b029bd6288bdffa03cdbb4f8b8d0a8b534
Author: Sébastien Wilmet <swilmet gnome org>
Date: Sun Aug 16 19:28:19 2015 +0200
view: remove useless checks
We know that on the left of the cursor there are only leading spaces.
No need to be paranoïd and checks everywhere.
gtksourceview/gtksourceview.c | 13 -------------
1 files changed, 0 insertions(+), 13 deletions(-)
---
diff --git a/gtksourceview/gtksourceview.c b/gtksourceview/gtksourceview.c
index 184ada5..7c79060 100644
--- a/gtksourceview/gtksourceview.c
+++ b/gtksourceview/gtksourceview.c
@@ -4110,7 +4110,6 @@ do_smart_backspace (GtkSourceView *view)
if ((visual_column % indent_width) == 0)
{
guint target_column;
- gunichar ch;
g_assert ((gint)visual_column >= indent_width);
target_column = visual_column - indent_width;
@@ -4118,18 +4117,6 @@ do_smart_backspace (GtkSourceView *view)
while (gtk_source_view_get_visual_column (view, &insert) > target_column)
{
gtk_text_iter_backward_cursor_position (&insert);
- ch = gtk_text_iter_get_char (&insert);
-
- if (!g_unichar_isspace (ch))
- {
- return FALSE;
- }
- }
-
- ch = gtk_text_iter_get_char (&insert);
- if (!g_unichar_isspace (ch))
- {
- return FALSE;
}
gtk_text_buffer_begin_user_action (buffer);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]