From e36d8cebd92b877111a96b10c7d9f31ec2650809 Mon Sep 17 00:00:00 2001 From: "Alexander S. Aganichev" Date: Fri, 11 Oct 2002 05:54:11 +0000 Subject: [PATCH] Random fixes --- docs/notework.txt | 11 +++++++++++ golded3/geedit.cpp | 19 ++++++++++++++++--- goldlib/gall/gwinput2.cpp | 9 +++++++-- goldlib/gcfg/gxhpt.cpp | 6 ++++++ 4 files changed, 40 insertions(+), 5 deletions(-) diff --git a/docs/notework.txt b/docs/notework.txt index 83238dc..128517b 100644 --- a/docs/notework.txt +++ b/docs/notework.txt @@ -12,6 +12,17 @@ ______________________________________________________________________ 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.). - Oops, EchoAreaDefaults was not applied to the includes. Fixed. diff --git a/golded3/geedit.cpp b/golded3/geedit.cpp index 8333ab0..37d89a4 100644 --- a/golded3/geedit.cpp +++ b/golded3/geedit.cpp @@ -294,9 +294,12 @@ void IEclass::dispstring(const char* __string, uint __row, int attr, Line* line) savechar = _buf[endblock]; _buf[endblock] = NUL; bool oldusestylies = CFG->usestylies; + bool oldhighlighturls = CFG->highlighturls; CFG->usestylies = false; + CFG->highlighturls = false; StyleCodeHighlight(_buf+begblock, __row, mincol+begblock, false, C_READA); CFG->usestylies = oldusestylies; + CFG->highlighturls = oldhighlighturls; _buf[endblock] = savechar; 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]; _buf[blockmark] = NUL; bool oldusestylies = CFG->usestylies; - if(selected) + bool oldhighlighturls = CFG->highlighturls; + if(selected) { CFG->usestylies = false; + CFG->highlighturls = false; + } StyleCodeHighlight(_buf, __row, mincol, false, selected ? C_READA : attr); CFG->usestylies = oldusestylies; _buf[blockmark] = savechar; - if(not selected) + if(not selected) { CFG->usestylies = false; + CFG->highlighturls = false; + } StyleCodeHighlight(_buf+blockmark, __row, mincol+blockmark, false, selected ? attr : C_READA); CFG->usestylies = oldusestylies; + CFG->highlighturls = oldhighlighturls; } else { bool oldusestylies = CFG->usestylies; - if(selected) + bool oldhighlighturls = CFG->highlighturls; + if(selected) { CFG->usestylies = false; + CFG->highlighturls = false; + } StyleCodeHighlight(_buf, __row, mincol, false, selected ? C_READA : attr); CFG->usestylies = oldusestylies; + CFG->highlighturls = oldhighlighturls; } } else diff --git a/goldlib/gall/gwinput2.cpp b/goldlib/gall/gwinput2.cpp index 79d7285..f23ae15 100644 --- a/goldlib/gall/gwinput2.cpp +++ b/goldlib/gall/gwinput2.cpp @@ -659,6 +659,11 @@ bool gwinput::handle_key(gkey key) { case Key_C_Ins: // fall through #endif 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: if(not handle_other_keys(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) - : destination(dest) - { prev = next = NULL; pos = buf_pos = buf_left_pos = 0; @@ -779,7 +782,9 @@ void gwinput::field::deactivate() { void gwinput::field::restore() { + std::string tmp(buf); strxcpy(buf, destination.c_str(), buf_len+1); + destination = tmp; convert(); activate(); } diff --git a/goldlib/gcfg/gxhpt.cpp b/goldlib/gcfg/gxhpt.cpp index 8f07b76..ba01451 100644 --- a/goldlib/gcfg/gxhpt.cpp +++ b/goldlib/gcfg/gxhpt.cpp @@ -181,6 +181,9 @@ void gareafile::ReadHPTFile(char* path, char* file, char* origin, int group) { std::cout << "* Reading " << file << std::endl; aa.reset(); + aa.type = GMB_NONE; + aa.msgbase = fidomsgtype; + aa.groupid = group; std::string 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_DUPEAREA: case CRC_BADAREA: + aa = echoareadefaults; aa.type = GMB_LOCAL; break; case CRC_ECHOAREA: @@ -240,6 +244,8 @@ void gareafile::ReadHPTFile(char* path, char* file, char* origin, int group) { case CRC_ECHOAREADEFAULTS: echoareadefaults.reset(); aa.type = GMB_DEFAULT; + aa.msgbase = fidomsgtype; + aa.groupid = group; break; }