Random fixes

This commit is contained in:
Alexander S. Aganichev 2002-10-11 05:54:11 +00:00
parent 293685cd8e
commit e36d8cebd9
4 changed files with 40 additions and 5 deletions

View File

@ -12,6 +12,17 @@ ______________________________________________________________________
Notes for GoldED+ 1.1.5, /snapshot/ Notes for GoldED+ 1.1.5, /snapshot/
______________________________________________________________________ ______________________________________________________________________
- EchoAreaDefaults was not applied to the local areas. Fixed.
! Ctrl-R and Alt-Backspace in fields now toggles information between
stored buffer and current value.
+ Added keyboard not redefinable assignments for clearing the whole
field contents: Ctrl-Del, Ctrl-D, and Ctrl-Y.
- Cosmetic: URL highlighting now have lower priority then selection
block in the editor.
- Fixed lastread problem after edit externutils (PGP, etc.). - Fixed lastread problem after edit externutils (PGP, etc.).
- Oops, EchoAreaDefaults was not applied to the includes. Fixed. - Oops, EchoAreaDefaults was not applied to the includes. Fixed.

View File

@ -294,9 +294,12 @@ void IEclass::dispstring(const char* __string, uint __row, int attr, Line* line)
savechar = _buf[endblock]; savechar = _buf[endblock];
_buf[endblock] = NUL; _buf[endblock] = NUL;
bool oldusestylies = CFG->usestylies; bool oldusestylies = CFG->usestylies;
bool oldhighlighturls = CFG->highlighturls;
CFG->usestylies = false; CFG->usestylies = false;
CFG->highlighturls = false;
StyleCodeHighlight(_buf+begblock, __row, mincol+begblock, false, C_READA); StyleCodeHighlight(_buf+begblock, __row, mincol+begblock, false, C_READA);
CFG->usestylies = oldusestylies; CFG->usestylies = oldusestylies;
CFG->highlighturls = oldhighlighturls;
_buf[endblock] = savechar; _buf[endblock] = savechar;
StyleCodeHighlight(_buf+endblock, __row, mincol+endblock, false, attr); StyleCodeHighlight(_buf+endblock, __row, mincol+endblock, false, attr);
} }
@ -306,22 +309,32 @@ void IEclass::dispstring(const char* __string, uint __row, int attr, Line* line)
char savechar = _buf[blockmark]; char savechar = _buf[blockmark];
_buf[blockmark] = NUL; _buf[blockmark] = NUL;
bool oldusestylies = CFG->usestylies; bool oldusestylies = CFG->usestylies;
if(selected) bool oldhighlighturls = CFG->highlighturls;
if(selected) {
CFG->usestylies = false; CFG->usestylies = false;
CFG->highlighturls = false;
}
StyleCodeHighlight(_buf, __row, mincol, false, selected ? C_READA : attr); StyleCodeHighlight(_buf, __row, mincol, false, selected ? C_READA : attr);
CFG->usestylies = oldusestylies; CFG->usestylies = oldusestylies;
_buf[blockmark] = savechar; _buf[blockmark] = savechar;
if(not selected) if(not selected) {
CFG->usestylies = false; CFG->usestylies = false;
CFG->highlighturls = false;
}
StyleCodeHighlight(_buf+blockmark, __row, mincol+blockmark, false, selected ? attr : C_READA); StyleCodeHighlight(_buf+blockmark, __row, mincol+blockmark, false, selected ? attr : C_READA);
CFG->usestylies = oldusestylies; CFG->usestylies = oldusestylies;
CFG->highlighturls = oldhighlighturls;
} }
else { else {
bool oldusestylies = CFG->usestylies; bool oldusestylies = CFG->usestylies;
if(selected) bool oldhighlighturls = CFG->highlighturls;
if(selected) {
CFG->usestylies = false; CFG->usestylies = false;
CFG->highlighturls = false;
}
StyleCodeHighlight(_buf, __row, mincol, false, selected ? C_READA : attr); StyleCodeHighlight(_buf, __row, mincol, false, selected ? C_READA : attr);
CFG->usestylies = oldusestylies; CFG->usestylies = oldusestylies;
CFG->highlighturls = oldhighlighturls;
} }
} }
else else

View File

@ -659,6 +659,11 @@ bool gwinput::handle_key(gkey key) {
case Key_C_Ins: // fall through case Key_C_Ins: // fall through
#endif #endif
case Key_C_C: clipboard_copy(); break; case Key_C_C: clipboard_copy(); break;
#if !defined(__UNIX__) || defined(__USE_NCURSES__)
case Key_C_Del: // fall through
#endif
case Key_C_Y: // fall through
case Key_C_D: clear_field(); break;
default: default:
if(not handle_other_keys(key)) if(not handle_other_keys(key))
enter_char(KCodAsc(key)); enter_char(KCodAsc(key));
@ -671,9 +676,7 @@ bool gwinput::handle_key(gkey key) {
// ------------------------------------------------------------------ // ------------------------------------------------------------------
gwinput::field::field(gwinput* iform, int idnum, int wrow, int wcol, int field_width, std::string& dest, int dest_size, int cvt, int mode) gwinput::field::field(gwinput* iform, int idnum, int wrow, int wcol, int field_width, std::string& dest, int dest_size, int cvt, int mode)
: destination(dest) : destination(dest)
{ {
prev = next = NULL; prev = next = NULL;
pos = buf_pos = buf_left_pos = 0; pos = buf_pos = buf_left_pos = 0;
@ -779,7 +782,9 @@ void gwinput::field::deactivate() {
void gwinput::field::restore() { void gwinput::field::restore() {
std::string tmp(buf);
strxcpy(buf, destination.c_str(), buf_len+1); strxcpy(buf, destination.c_str(), buf_len+1);
destination = tmp;
convert(); convert();
activate(); activate();
} }

View File

@ -181,6 +181,9 @@ void gareafile::ReadHPTFile(char* path, char* file, char* origin, int group) {
std::cout << "* Reading " << file << std::endl; std::cout << "* Reading " << file << std::endl;
aa.reset(); aa.reset();
aa.type = GMB_NONE;
aa.msgbase = fidomsgtype;
aa.groupid = group;
std::string s; std::string s;
while(ReadHPTLine(fp, &s)) { while(ReadHPTLine(fp, &s)) {
@ -231,6 +234,7 @@ void gareafile::ReadHPTFile(char* path, char* file, char* origin, int group) {
case CRC_LOCALAREA: case CRC_LOCALAREA:
case CRC_DUPEAREA: case CRC_DUPEAREA:
case CRC_BADAREA: case CRC_BADAREA:
aa = echoareadefaults;
aa.type = GMB_LOCAL; aa.type = GMB_LOCAL;
break; break;
case CRC_ECHOAREA: case CRC_ECHOAREA:
@ -240,6 +244,8 @@ void gareafile::ReadHPTFile(char* path, char* file, char* origin, int group) {
case CRC_ECHOAREADEFAULTS: case CRC_ECHOAREADEFAULTS:
echoareadefaults.reset(); echoareadefaults.reset();
aa.type = GMB_DEFAULT; aa.type = GMB_DEFAULT;
aa.msgbase = fidomsgtype;
aa.groupid = group;
break; break;
} }