From cc83827621f181bbedad72e4d878c31964929114 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Tue, 25 May 2004 19:58:30 +0000 Subject: [PATCH] Could not delete a selection using backspace if that selection started at the first character. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7644 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/apps/diskprobe/FindWindow.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/apps/diskprobe/FindWindow.cpp b/src/apps/diskprobe/FindWindow.cpp index e99845e2f3..dfce5095d9 100644 --- a/src/apps/diskprobe/FindWindow.cpp +++ b/src/apps/diskprobe/FindWindow.cpp @@ -184,9 +184,10 @@ FindTextView::KeyDown(const char *bytes, int32 numBytes) GetSelection(&start, &end); if (bytes[0] == B_BACKSPACE) { - start--; - if (start < 0) + if (--start < 0 && end == 0) return; + + start = 0; } if (Text()[start] == ' ')