Skip to content

Commit f490698

Browse files
authored
Merge pull request #44 from fiendish/master
keep_pause_at_bottom numeric option
2 parents 079ba7f + 42f311d commit f490698

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

doc.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -738,7 +738,8 @@ class CMUSHclientDoc : public CDocument
738738
unsigned short m_bShowBold; // show bold, italic, underline in fonts
739739
unsigned short m_bAltArrowRecallsPartial; // alt+up arrow recalls partially entered command
740740
unsigned short m_iPixelOffset; // pixel offset of text from side of window
741-
unsigned short m_bAutoFreeze; // freeze if not at bottom of buffer
741+
unsigned short m_bAutoFreeze; // freeze if not at bottom of buffer
742+
unsigned short m_bKeepFreezeAtBottom; // don't automatically unfreeze after returning to bottom of buffer
742743
unsigned short m_bAutoRepeat; // auto repeat last command
743744
unsigned short m_bDisableCompression; // don't allow compressed worlds
744745
unsigned short m_bLowerCaseTabCompletion; // tab complete words in lower case

mushview.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4748,8 +4748,13 @@ int iDeltaY = m_scroll_position.y - pt.y;
47484748
// ScrollInfo.nPos = pt.x;
47494749
// SetScrollInfo (SB_HORZ, &ScrollInfo, pDoc->m_bScrollBarWanted);
47504750

4751-
if (pDoc->m_bAutoFreeze)
4752-
m_freeze = pt.y < (m_ScrollbarSizeTotal.cy - m_ScrollbarSizePage.cy);
4751+
if (pDoc->m_bAutoFreeze) {
4752+
if (pDoc->m_bKeepFreezeAtBottom) {
4753+
m_freeze = m_freeze || (pt.y < (m_ScrollbarSizeTotal.cy - m_ScrollbarSizePage.cy));
4754+
} else {
4755+
m_freeze = pt.y < (m_ScrollbarSizeTotal.cy - m_ScrollbarSizePage.cy);
4756+
}
4757+
}
47534758

47544759
} // end of CMUSHView::ScrollToPosition
47554760

scriptingoptions.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ tConfigurationNumericOption OptionsTable [] = {
5151
{"auto_allow_snooping", false, O(m_bAutoAllowSnooping)},
5252
{"auto_copy_to_clipboard_in_html", false, O(m_bAutoCopyInHTML)},
5353
{"auto_pause", true, O(m_bAutoFreeze)},
54+
{"keep_pause_at_bottom", false, O(m_bKeepFreezeAtBottom)},
5455
{"auto_repeat", false, O(m_bAutoRepeat)},
5556
{"auto_resize_command_window", false, O(m_bAutoResizeCommandWindow)},
5657
{"auto_resize_minimum_lines", 1, O(m_iAutoResizeMinimumLines), 1, 100},

0 commit comments

Comments
 (0)