Skip to content
Snippets Groups Projects
Commit 588845f3 authored by George Nachman's avatar George Nachman
Browse files

Add advanced setting to make scroll wheel response very sensitive.

parent 289f3183
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -25,6 +25,7 @@
 
#import "iTerm.h"
#import "FutureMethods.h"
#import "iTermAdvancedSettingsModel.h"
#import "PreferencePanel.h"
#import "PTYScrollView.h"
#import "PTYTextView.h"
Loading
Loading
@@ -155,7 +156,15 @@ static CGFloat RoundTowardZero(CGFloat value) {
if (theEvent.hasPreciseScrollingDeltas) {
delta /= self.verticalLineScroll;
}
if ([iTermAdvancedSettingsModel sensitiveScrollWheel]) {
if (delta > 0) {
return ceil(delta);
} else if (delta < 0) {
return floor(delta);
} else {
return 0;
}
}
PTYScroller *verticalScroller = (PTYScroller *)[self verticalScroller];
verticalScroller.accumulatedDeltaY += delta;
CGFloat amount = 0;
Loading
Loading
Loading
Loading
@@ -193,5 +193,6 @@
+ (BOOL)lowFiCombiningMarks;
+ (CGFloat)verticalBarCursorWidth;
+ (BOOL)statusBarIcon;
+ (BOOL)sensitiveScrollWheel;
 
@end
Loading
Loading
@@ -106,6 +106,7 @@ DEFINE_BOOL(alwaysAcceptFirstMouse, NO, @"Mouse: Always accept first mouse event
DEFINE_BOOL(doubleReportScrollWheel, NO, @"Mouse: Double-report scroll wheel events to work around tmux scrolling bug.");
DEFINE_BOOL(stealKeyFocus, NO, @"Mouse: When Focus Follows Mouse is enabled, steal key focus even when inactive.");
DEFINE_BOOL(cmdClickWhenInactiveInvokesSemanticHistory, NO, @"Mouse: ⌘-click in an active pane while iTerm2 isn't the active app invokes Semantic History.\nBy default, iTerm2 respects the OS standard that ⌘-click in an app that doesn't have keyboard focus behaves like a non-⌘ click that does not raise the window.");
DEFINE_BOOL(sensitiveScrollWheel, NO, @"Mouse: Scroll on any scroll wheel movement, no matter how small?");
 
#pragma mark Terminal
DEFINE_BOOL(traditionalVisualBell, NO, @"Terminal: Visual bell flashes the whole screen, not just a bell icon.");
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment