Changeset 7feb86e6 in mainline for uspace/app/edit/sheet.c


Ignore:
Timestamp:
2012-08-17T10:56:57Z (12 years ago)
Author:
Martin Sucha <sucha14@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
1e58e1b, 2f136e4
Parents:
20dccf3
Message:

Improve edit.

  • Fix Home moving caret to the end of previous line
  • Add next/prev char movement to spt
  • Refactor caret movement code
  • Implement search function
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/edit/sheet.c

    r20dccf3 r7feb86e6  
    323323}
    324324
     325/** Get a character at spt and return next spt */
     326wchar_t spt_next_char(spt_t spt, spt_t *next)
     327{
     328        wchar_t ch = str_decode(spt.sh->data, &spt.b_off, spt.sh->text_size);
     329        if (next)
     330                *next = spt;
     331        return ch;
     332}
     333
     334wchar_t spt_prev_char(spt_t spt, spt_t *prev)
     335{
     336        wchar_t ch = str_decode_reverse(spt.sh->data, &spt.b_off, spt.sh->text_size);
     337        if (prev)
     338                *prev = spt;
     339        return ch;
     340}
     341
    325342/** Place a tag on the specified s-point. */
    326343void sheet_place_tag(sheet_t *sh, spt_t const *pt, tag_t *tag)
Note: See TracChangeset for help on using the changeset viewer.