{
char * dot = strchr(word, '.');
char * s = null;
- if(dot && dot == word + wordLen)
- strtod(dot+1, &s);
+ if(dot)
+ strtod((dot == word + wordLen) ? (dot+1) : word, &s);
else
- strtod(word, &s);
- if(s)
+ strtol(word, &s, 0);
+ if(s && s != word)
{
if((dot && *s == 'f' && !isalnum(s[1]) && s[1] != '_') || (!isalpha(*s) && *s != '_'))
{
{
key.code = (SmartKey)key.code;
}
+ else if(!ch && key.alt)
+ key.code = 0;
switch(key.code) //(ch || key.alt || key.ctrl) ? key.code : (Key)(SmartKey)key.code)
{
case home:
{
if(style.stuckCaret) break;
+ if(!style.multiLine && key.ctrl) break;
if(!(style.freeCaret))
this.selX = Min(this.selX, this.selLine.count);
case end:
{
if(style.stuckCaret) break;
+ if(!style.multiLine && key.ctrl) break;
if(!style.freeCaret)
this.selX = Min(this.selX, this.selLine.count);
}
break;
case pageDown:
- if(key.ctrl)
+ if(style.multiLine)
{
- if(!(style.hScroll) || hasHorzScroll) break;
- if(this.viewX < this.maxLength)
+ if(key.ctrl)
{
- //this.viewX+=this.space.w*this.tabSize;
- //DirtyAll();
- SetScrollPosition((this.viewX + this.space.w*this.tabSize), this.viewY * this.space.h);
+ if(!(style.hScroll) || hasHorzScroll) break;
+ if(this.viewX < this.maxLength)
+ {
+ //this.viewX+=this.space.w*this.tabSize;
+ //DirtyAll();
+ SetScrollPosition((this.viewX + this.space.w*this.tabSize), this.viewY * this.space.h);
+ }
}
+ else
+ {
+ PageDown();
+ DirtyAll();
+ if(!shift) Deselect();
+ SetCursorToViewX();
+ SetCursorToViewY();
+ }
+ return false;
}
- else
- {
- PageDown();
- DirtyAll();
- if(!shift) Deselect();
- SetCursorToViewX();
- SetCursorToViewY();
- }
- return false;
- // break;
+ break;
case pageUp:
- if(key.ctrl)
+ if(style.multiLine)
{
- if(!(style.hScroll) || hasHorzScroll) break;
- if(this.viewX > 0)
+ if(key.ctrl)
{
- //this.viewX-=this.space.w*this.tabSize;
- //this.viewX = Max(this.viewX,0);
- //DirtyAll();
- SetScrollPosition((this.viewX-this.space.w*this.tabSize), this.viewY * this.space.h);
- // SetCursorToView();
+ if(!(style.hScroll) || hasHorzScroll) break;
+ if(this.viewX > 0)
+ {
+ //this.viewX-=this.space.w*this.tabSize;
+ //this.viewX = Max(this.viewX,0);
+ //DirtyAll();
+ SetScrollPosition((this.viewX-this.space.w*this.tabSize), this.viewY * this.space.h);
+ // SetCursorToView();
+ }
}
+ else
+ {
+ PageUp();
+ DirtyAll();
+ if(!shift) Deselect();
+ SetCursorToViewX();
+ SetCursorToViewY();
+ }
+ return false;
}
- else
- {
- PageUp();
- DirtyAll();
- if(!shift) Deselect();
- SetCursorToViewX();
- SetCursorToViewY();
- }
- // break;
- return false;
+ break;
case insert:
if(key.ctrl)
{
delete newline;
}
return false;
- } else if(!key.ctrl && !key.alt && ch != 128 && ch >= 32)
+ }
+ else if(!key.ctrl && !key.alt && ch != 128 && ch >= 32)
{
PutCh(ch);
return false;