diff --git a/src/text.c b/src/text.c
index d267f62ef65ce6ef5b6618834dcbddf1d373c429..015432b2d69f118e8e13437303c9c1de1a413b6e 100644
--- a/src/text.c
+++ b/src/text.c
@@ -298,17 +298,9 @@ void do_indent(ssize_t cols)
 
     assert(openfile->current != NULL && openfile->current->data != NULL);
 
-    /* If cols is zero, get out. */
-    if (cols == 0)
-	return;
-
-    /* If cols is negative, make it positive and set unindent to TRUE. */
-    if (cols < 0) {
-	cols = -cols;
-	unindent = TRUE;
     /* Otherwise, we're indenting, in which case the file will always be
      * modified, so set indent_changed to TRUE. */
-    } else
+    if (!unindent)
 	indent_changed = TRUE;
 
     /* If the mark is on, use all lines covered by the mark. */
@@ -449,7 +441,7 @@ void do_unindent(ssize_t cols)
 {
     bool indent_changed = FALSE;
 	/* Whether any indenting or unindenting was done. */
-    bool unindent = FALSE;
+    bool unindent = TRUE;
 	/* Whether we're unindenting text. */
     char *line_indent = NULL;
 	/* The text added to each line in order to indent it. */
@@ -461,17 +453,9 @@ void do_unindent(ssize_t cols)
 
     assert(openfile->current != NULL && openfile->current->data != NULL);
 
-    /* If cols is zero, get out. */
-    if (cols == 0)
-	return;
-
-    /* If cols is negative, make it positive and set unindent to TRUE. */
-    if (cols < 0) {
-	cols = -cols;
-	unindent = TRUE;
     /* Otherwise, we're indenting, in which case the file will always be
      * modified, so set indent_changed to TRUE. */
-    } else
+    if (!unindent)
 	indent_changed = TRUE;
 
     /* If the mark is on, use all lines covered by the mark. */
@@ -600,7 +584,7 @@ void do_unindent(ssize_t cols)
  * is on, tabsize columns. */
 void do_unindent_void(void)
 {
-    do_unindent(-tabsize);
+    do_unindent(tabsize);
 }
 #endif /* !NANO_TINY */