Skip to content

Commit

Permalink
NAWS width handling & reporting (#4002)
Browse files Browse the repository at this point in the history
  • Loading branch information
mpconley committed Jul 28, 2020
1 parent f4afc37 commit bf7bddb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/ctelnet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,7 @@ bool cTelnet::socketOutRaw(std::string& data)

void cTelnet::setDisplayDimensions()
{
int x = mpHost->mWrapAt;
int x = (mpHost->mScreenWidth < mpHost->mWrapAt) ? mpHost->mScreenWidth : mpHost->mWrapAt;
int y = mpHost->mScreenHeight;
if (myOptionState[static_cast<size_t>(OPT_NAWS)]) {
std::string s;
Expand Down
2 changes: 1 addition & 1 deletion src/dlgProfilePreferences.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2384,6 +2384,7 @@ void dlgProfilePreferences::slot_save_and_exit()
pHost->setUserDictionaryOptions(true, false);
}
pHost->mWrapAt = wrap_at_spinBox->value();
pHost->adjustNAWS();
pHost->mWrapIndentCount = indent_wrapped_spinBox->value();
pHost->mPrintCommand = show_sent_text_checkbox->isChecked();
pHost->mAutoClearCommandLineAfterSend = auto_clear_input_line_checkbox->isChecked();
Expand Down Expand Up @@ -2452,7 +2453,6 @@ void dlgProfilePreferences::slot_save_and_exit()
pHost->mSslIgnoreSelfSigned = checkBox_self_signed->isChecked();
pHost->mSslIgnoreAll = checkBox_ignore_all->isChecked();


if (pMudlet->mConsoleMap.contains(pHost)) {
pMudlet->mConsoleMap[pHost]->changeColors();
}
Expand Down

0 comments on commit bf7bddb

Please sign in to comment.