Index: uspace/app/bdsh/input.c
===================================================================
--- uspace/app/bdsh/input.c	(revision e2282809c1028bf74344be78dd6dc86c20f336b9)
+++ uspace/app/bdsh/input.c	(revision 089d746548cf1ac3708cf3274d20bba32a0efed4)
@@ -39,5 +39,4 @@
 #include <errno.h>
 #include <assert.h>
-#include <macros.h>
 #include <bool.h>
 
@@ -264,8 +263,11 @@
 static void tinput_seek_vertical(tinput_t *ti, seek_dir_t dir)
 {
-	if (dir == seek_forward)
-		ti->pos = min(ti->pos + ti->con_cols, ti->nc);
-	else 
-		ti->pos = max(0, ti->pos - ti->con_cols);
+	if (dir == seek_forward) {
+		if (ti->pos + ti->con_cols <= ti->nc)
+			ti->pos = ti->pos + ti->con_cols;
+	} else {
+		if (ti->pos - ti->con_cols >= 0)
+			ti->pos = ti->pos - ti->con_cols;
+	}
 
 	tinput_position_caret(ti);
