Changeset 335413f1


Ignore:
Timestamp:
Aug 7, 2010, 12:55:50 AM (14 years ago)
Author:
David Benjamin <davidben@mit.edu>
Branches:
master, release-1.10, release-1.7, release-1.8, release-1.9
Children:
d40ad8b
Parents:
e5c9d3de
git-author:
David Benjamin <davidben@mit.edu> (08/07/10 00:50:19)
git-committer:
David Benjamin <davidben@mit.edu> (08/07/10 00:55:50)
Message:
Fix owl_editwin_move_to_beginning_of_line for empty first lines

The condition for determining whether we stopped moving because we
encountered the beginning of the buffer or the end of the previous line
was incorrect. As a result, the editwin was moving back an extra line
when the first line was empty.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • editwin.c

    r3f11c00 r335413f1  
    835835    distance += owl_editwin_point_move(e, -1);
    836836    distance += owl_editwin_move_if_not_in(e, -1, "\n");
    837     if (distance && !owl_editwin_at_beginning_of_buffer(e))
     837    /* If we stopped because we reached a '\n', rather than because we
     838     * hit the top of the buffer, move forward from the end of the
     839     * previous line to the start of the current. */
     840    if (owl_editwin_get_char_at_point(e) == '\n')
    838841      distance += owl_editwin_point_move(e, 1);
    839842  }
Note: See TracChangeset for help on using the changeset viewer.