Wrapping fixes, logo painted to yellow by default
This commit is contained in:
parent
9032d0856d
commit
f03086f6a7
@ -37,8 +37,6 @@
|
|||||||
// ------------------------------------------------------------------
|
// ------------------------------------------------------------------
|
||||||
// Globals
|
// Globals
|
||||||
|
|
||||||
int CFG__editquotewrap = YES;
|
|
||||||
|
|
||||||
Line* Edit__killbuf = NULL;
|
Line* Edit__killbuf = NULL;
|
||||||
Line* Edit__pastebuf = NULL;
|
Line* Edit__pastebuf = NULL;
|
||||||
|
|
||||||
@ -639,7 +637,7 @@ Line* IEclass::wrapit(Line** __currline, uint* __curr_col, uint* __curr_row, boo
|
|||||||
_quotelen = 0;
|
_quotelen = 0;
|
||||||
|
|
||||||
// Is this line quoted?
|
// Is this line quoted?
|
||||||
if((_thisline->type & GLINE_QUOT) and CFG__editquotewrap) {
|
if(_thisline->type & GLINE_QUOT) {
|
||||||
|
|
||||||
// Get quote string and length
|
// Get quote string and length
|
||||||
GetQuotestr(_thisline->txt.c_str(), _quotebuf, &_quotelen);
|
GetQuotestr(_thisline->txt.c_str(), _quotebuf, &_quotelen);
|
||||||
@ -839,7 +837,7 @@ Line* IEclass::wrapit(Line** __currline, uint* __curr_col, uint* __curr_row, boo
|
|||||||
_thislen = _thisline->txt.length();
|
_thislen = _thisline->txt.length();
|
||||||
|
|
||||||
// If we are on the cursor line, check if the cursor char was wrapped
|
// If we are on the cursor line, check if the cursor char was wrapped
|
||||||
if((_thisrow == _cursrow) and (_thislen <= _curscol) and not ((_thislen == _curscol) and (_thisline->txt[_curscol] != ' '))) {
|
if((_thisrow == _cursrow) and (_thislen <= _curscol)) {
|
||||||
_curscol = _quotelen + ((_curscol > _wrappos) ? _curscol-_wrappos : 0);
|
_curscol = _quotelen + ((_curscol > _wrappos) ? _curscol-_wrappos : 0);
|
||||||
_cursrow++;
|
_cursrow++;
|
||||||
UndoItem* i = Undo->last_item;
|
UndoItem* i = Undo->last_item;
|
||||||
@ -947,6 +945,15 @@ void IEclass::insertchar(char __ch) {
|
|||||||
// Insert or overwrite the char, replacing the block if any
|
// Insert or overwrite the char, replacing the block if any
|
||||||
if((selecting ? (BlockCut(true), batch_mode = BATCH_MODE) : false) or
|
if((selecting ? (BlockCut(true), batch_mode = BATCH_MODE) : false) or
|
||||||
(col >= _currline_len) or (currline->txt[col] == '\n') or insert) {
|
(col >= _currline_len) or (currline->txt[col] == '\n') or insert) {
|
||||||
|
if(not isspace(__ch) and (col == mincol)) {
|
||||||
|
// if previous line was wrapped on non-space character
|
||||||
|
if(currline->prev and not currline->prev->txt.empty() and
|
||||||
|
(currline->prev->txt.find('\n') == currline->prev->txt.npos) and
|
||||||
|
not isspace(currline->prev->txt[currline->prev->txt.length()-1])) {
|
||||||
|
GoUp();
|
||||||
|
GoEOL();
|
||||||
|
}
|
||||||
|
}
|
||||||
Undo->PushItem(EDIT_UNDO_INS_CHAR|batch_mode);
|
Undo->PushItem(EDIT_UNDO_INS_CHAR|batch_mode);
|
||||||
currline->txt.insert(col, 1, __ch);
|
currline->txt.insert(col, 1, __ch);
|
||||||
} else {
|
} else {
|
||||||
@ -1013,7 +1020,7 @@ void IEclass::DelChar() {
|
|||||||
// Is the next line quoted?
|
// Is the next line quoted?
|
||||||
// And is the cursor column non-zero?
|
// And is the cursor column non-zero?
|
||||||
uint _quotelen = 0;
|
uint _quotelen = 0;
|
||||||
if((_nextline->type & GLINE_QUOT) and CFG__editquotewrap and col) {
|
if((_nextline->type & GLINE_QUOT) and col) {
|
||||||
|
|
||||||
// Get quote string length
|
// Get quote string length
|
||||||
char _dummybuf[100];
|
char _dummybuf[100];
|
||||||
@ -1022,7 +1029,7 @@ void IEclass::DelChar() {
|
|||||||
|
|
||||||
// Copy the next line's text to this line without quote string
|
// Copy the next line's text to this line without quote string
|
||||||
const char *_nexttext = _nextline->txt.c_str()+_quotelen;
|
const char *_nexttext = _nextline->txt.c_str()+_quotelen;
|
||||||
_thisline->txt += _nexttext + strspn(_nexttext, " ");
|
_thisline->txt += _nexttext + (col ? strspn(_nexttext, " ") : 0);
|
||||||
|
|
||||||
Undo->PushItem(EDIT_UNDO_CUT_TEXT|batch_mode, _thisline, col);
|
Undo->PushItem(EDIT_UNDO_CUT_TEXT|batch_mode, _thisline, col);
|
||||||
|
|
||||||
@ -1051,12 +1058,10 @@ void IEclass::DelChar() {
|
|||||||
// Make sure the line type still is correct
|
// Make sure the line type still is correct
|
||||||
setlinetype(_thisline);
|
setlinetype(_thisline);
|
||||||
|
|
||||||
uint _thisrow = row;
|
|
||||||
|
|
||||||
// Rewrap this line
|
// Rewrap this line
|
||||||
wrapdel(&currline, &col, &row, false);
|
wrapdel(&currline, &col, &row);
|
||||||
|
|
||||||
refresh(_thisline, _thisrow);
|
refresh(currline, row);
|
||||||
|
|
||||||
GFTRK(NULL);
|
GFTRK(NULL);
|
||||||
}
|
}
|
||||||
|
@ -104,8 +104,6 @@
|
|||||||
// ------------------------------------------------------------------
|
// ------------------------------------------------------------------
|
||||||
// Globals
|
// Globals
|
||||||
|
|
||||||
extern int CFG__editquotewrap;
|
|
||||||
|
|
||||||
extern Line* Edit__killbuf;
|
extern Line* Edit__killbuf;
|
||||||
extern Line* Edit__pastebuf;
|
extern Line* Edit__pastebuf;
|
||||||
|
|
||||||
|
@ -376,14 +376,15 @@ static void w_brag() {
|
|||||||
W_READ = wopen_(1, 2, MAXROW-4, MAXCOL-5, W_BBRAG, C_BRAGB, C_BRAGW);
|
W_READ = wopen_(1, 2, MAXROW-4, MAXCOL-5, W_BBRAG, C_BRAGB, C_BRAGW);
|
||||||
w_shadow();
|
w_shadow();
|
||||||
|
|
||||||
wprints(0, 0, C_BRAGW, " 88 88 88 ");
|
wprints(0, 0, C_BRAGB, " 88 88 88 ");
|
||||||
wprints(1, 0, C_BRAGW, " oooooo oooooo 88 oooo88 oooooo oooo88 o ");
|
wprints(1, 0, C_BRAGB, " oooooo oooooo 88 oooo88 oooooo oooo88 o ");
|
||||||
wprints(2, 0, C_BRAGW, " 88 88 88 88 88 88 88 88oo88 88 88 o8o ");
|
wprints(2, 0, C_BRAGB, " 88 88 88 88 88 88 88 88oo88 88 88 o8o ");
|
||||||
wprints(3, 0, C_BRAGW, " 88oo88 88oo88 88 88oo88 88oooo 88oo88 8 ");
|
wprints(3, 0, C_BRAGB, " 88oo88 88oo88 88 88oo88 88oooo 88oo88 8 ");
|
||||||
wprints(4, 0, C_BRAGW, " oo 88 ");
|
wprints(4, 0, C_BRAGB, " oo 88 ");
|
||||||
wprints(5, 0, C_BRAGW, " 88oooooo88 ");
|
wprints(5, 0, C_BRAGB, " 88oooooo88 ");
|
||||||
|
|
||||||
wprints(4, 43-strlen(__gver_longpid__), C_BRAGW, __gver_longpid__);
|
wprints(4, 46-strlen(__gver_longpid__)-1-strlen(__gver_ver__), C_BRAGW, __gver_longpid__);
|
||||||
|
wprints(4, 46-strlen(__gver_ver__), C_BRAGW, __gver_ver__);
|
||||||
|
|
||||||
wprints(5, 12, C_BRAGW, "http://golded-plus.sourceforge.net");
|
wprints(5, 12, C_BRAGW, "http://golded-plus.sourceforge.net");
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user