Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 089d746 in mainline


Ignore:
Timestamp:
2009-12-01T21:53:40Z (12 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master
Children:
84b14e2
Parents:
4a2aa91 (diff), 3041fef1 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge small shell ui adjustment.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/bdsh/input.c

    r4a2aa91 r089d746  
    3939#include <errno.h>
    4040#include <assert.h>
    41 #include <macros.h>
    4241#include <bool.h>
    4342
     
    264263static void tinput_seek_vertical(tinput_t *ti, seek_dir_t dir)
    265264{
    266         if (dir == seek_forward)
    267                 ti->pos = min(ti->pos + ti->con_cols, ti->nc);
    268         else
    269                 ti->pos = max(0, ti->pos - ti->con_cols);
     265        if (dir == seek_forward) {
     266                if (ti->pos + ti->con_cols <= ti->nc)
     267                        ti->pos = ti->pos + ti->con_cols;
     268        } else {
     269                if (ti->pos - ti->con_cols >= 0)
     270                        ti->pos = ti->pos - ti->con_cols;
     271        }
    270272
    271273        tinput_position_caret(ti);
Note: See TracChangeset for help on using the changeset viewer.