Changeset 6073462 for editwin.c


Ignore:
Timestamp:
Jul 11, 2009, 1:14:34 PM (12 years ago)
Author:
Nelson Elhage <nelhage@mit.edu>
Branches:
master, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
521bc84
Parents:
2021bea
git-author:
Karl Ramm <kcr@1ts.org> (06/09/09 20:29:35)
git-committer:
Nelson Elhage <nelhage@mit.edu> (07/11/09 13:14:34)
Message:
make owl_editwin_adjust_for_locktext go away
(and cleanse owl_editwin_clear slightly)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • editwin.c

    r2021bea r6073462  
    220220{
    221221
    222   int lock;
     222  int lock = e->lock;
    223223  int dotsend=e->dotsend;
    224224  char *locktext=NULL;
    225225  char echochar=e->echochar;
    226226
    227   lock=0;
    228   if (e->lock > 0) {
    229     lock=1;
    230 
     227  if (lock > 0) {
    231228    locktext=owl_malloc(e->lock+20);
    232229    strncpy(locktext, e->buff, e->lock);
     
    248245
    249246  if (locktext) owl_free(locktext);
    250   owl_editwin_adjust_for_locktext(e);
     247
     248  e->index = lock;
    251249}
    252250
     
    711709{
    712710  return g_utf8_get_char(e->buff + e->index);
    713 }
    714 
    715 void owl_editwin_adjust_for_locktext(owl_editwin *e)
    716 {
    717   /* if we happen to have the cursor over locked text
    718    * move it to be out of the locktext region */
    719   if (e->index < e->lock) {
    720     e->index = e->lock;
    721   }
    722711}
    723712
Note: See TracChangeset for help on using the changeset viewer.