Changeset 3028


Ignore:
Timestamp:
Mar 6, 2000, 11:39:03 PM (25 years ago)
Author:
sandervl
Message:

fixed EN_LINESCROLL bug

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/src/user32/edit.cpp

    r2873 r3028  
    1 /* $Id: edit.cpp,v 1.36 2000-02-23 17:05:16 cbratschi Exp $ */
     1/* $Id: edit.cpp,v 1.37 2000-03-06 22:39:03 sandervl Exp $ */
    22/*
    33 *      Edit control
     
    22112211{
    22122212        INT nyoff;
     2213        INT vlc = (es->format_rect.bottom - es->format_rect.top) / es->line_height;
    22132214
    22142215        if (!(es->style & ES_MULTILINE))
     
    22202221                dx = es->text_width - es->x_offset;
    22212222        nyoff = MAX(0, es->y_offset + dy);
    2222         if (nyoff >= es->line_count)
    2223                 nyoff = es->line_count - 1;
     2223
     2224        //SvL: If nyoff > nr lines in control -> last line in control
     2225        //     window should show last line of control
     2226        //     Wine code shows last line at the top of the control
     2227        //     (Quake 3 startup edit control shows the problem)
     2228        if (nyoff >= es->line_count) {
     2229                if(es->line_count <= vlc) {
     2230                        nyoff = es->y_offset;   //no need to scroll
     2231                }
     2232                else    nyoff = es->line_count - vlc - 1;
     2233        }
    22242234        dy = (es->y_offset - nyoff) * es->line_height;
    22252235        if (dx || dy)
Note: See TracChangeset for help on using the changeset viewer.