Skip to content
Snippets Groups Projects
Commit 8d60770f authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Change external editor yes/no prompt default to match current user setting

Also, although not a bug (because we re-read/parse the user's record every
menu cycle), don't decrement user.xedit before calling uselect()
- just not a good practice to not modify variables unnecessarily.
See the corresponding change to exec.cpp, which was a bug.
parent bbe99798
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #4717 passed
......@@ -905,16 +905,15 @@ void sbbs_t::maindflts(user_t* user)
putusermisc(user->number, user->misc);
break;
case 'E':
if(noyes(text[UseExternalEditorQ])) {
if((!user->xedit && noyes(text[UseExternalEditorQ]))
|| (user->xedit && !yesno(text[UseExternalEditorQ]))) {
if(!(sys_status & SS_ABORT))
putuserstr(user->number, USER_XEDIT, nulstr);
break;
}
if(user->xedit)
user->xedit--;
for(i=0;i<cfg.total_xedits;i++)
uselect(1,i,text[ExternalEditorHeading],cfg.xedit[i]->name, cfg.xedit[i]->ar);
if((i=uselect(0,user->xedit,0,0,0))>=0)
if((i=uselect(0,user->xedit ? user->xedit-1:0,0,0,0))>=0)
putuserstr(user->number, USER_XEDIT, cfg.xedit[i]->code);
break;
case 'K': /* Command shell */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment