Commit 72653349 authored by rswindell's avatar rswindell
Browse files

If Ctrl-A~ is followed by a control character (e.g. CR or LF) or the end of...

If Ctrl-A~ is followed by a control character (e.g. CR or LF) or the end of the string/file, then create a hungry hotspot for the line that sends CR when clicked.
parent 92a64eb6
......@@ -92,9 +92,12 @@ int sbbs_t::bputs(const char *str, long mode)
l++;
if(str[l] == 'Z') /* EOF (uppercase 'Z' only) */
break;
if(str[l] == '~' && str[l + 1] >= ' ') { // Mouse hot-spot (hungry)
if(str[l] == '~') { // Mouse hot-spot (hungry)
l++;
add_hotspot(str[l], /* hungry */true);
if(str[l] >= ' ')
add_hotspot(str[l], /* hungry */true);
else
add_hotspot('\r', /* hungry */true);
continue;
}
if(str[l] == '`' && str[l + 1] >= ' ') { // Mouse hot-spot (strict)
......
......@@ -148,9 +148,12 @@ char sbbs_t::putmsg(const char *buf, long mode, long org_cols, JSObject* obj)
}
else if(str[l+1] == 'Z') /* Ctrl-AZ==EOF (uppercase 'Z' only) */
break;
else if(str[l + 1] == '~' && str[l + 2] >= ' ') {
add_hotspot(str[l + 2], /* hungry: */true);
else if(str[l + 1] == '~') {
l += 2;
if(str[l] >= ' ')
add_hotspot(str[l], /* hungry: */true);
else
add_hotspot('\r', /* hungry: */true);
}
else if(str[l + 1] == '`' && str[l + 2] >= ' ') {
add_hotspot(str[l + 2], /* hungry: */false);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment