24198f652f
Since commit 25d259264 (vi: make buffer handling more vi-like) find_range() can return early when an invalid movement is specified. The call to find_range() in the code that handles shift commands ('<' and '>') doesn't check for this condition. Previously this only resulted in the current line being shifted but it can now result in a segfault. Check for an invalid movement and notify the user without taking any further action. function old new delta do_cmd 4890 4898 +8 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/0 up/down: 8/0) Total: 8 bytes Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>