| Summary: | dead loop in vi | ||
|---|---|---|---|
| Product: | Base System | Reporter: | davidx <davidx> |
| Component: | bin | Assignee: | dd <dd> |
| Status: | Closed FIXED | ||
| Severity: | Affects Only Me | ||
| Priority: | Normal | ||
| Version: | Unspecified | ||
| Hardware: | Any | ||
| OS: | Any | ||
|
Description
davidx
2001-07-04 06:20:01 UTC
David Xu <davidx@viasoft.com.cn> writes: > >How-To-Repeat: > $vi > :set leftright > :set number Try this patch please: Index: vs_refresh.c =================================================================== RCS file: /stl/src/FreeBSD/src/contrib/nvi/vi/vs_refresh.c,v retrieving revision 1.2 diff -u -r1.2 vs_refresh.c --- vs_refresh.c 1998/08/02 15:18:44 1.2 +++ vs_refresh.c 2001/07/04 05:59:57 @@ -595,7 +595,7 @@ * for the number option offset. */ cnt = vs_columns(sp, NULL, LNO, &CNO, NULL); - if (O_ISSET(sp, O_NUMBER)) + if (O_ISSET(sp, O_NUMBER) && cnt >= O_NUMBER_LENGTH) cnt -= O_NUMBER_LENGTH; /* Adjust the window towards the beginning of the line. */ State Changed From-To: open->analyzed fixed in -current, thanks for the report Responsible Changed From-To: freebsd-bugs->dd My MFC reminder. State Changed From-To: analyzed->closed MFC'd |