diff --git a/ColorPicker/ColorPicker/CPKKDTree.h b/ColorPicker/ColorPicker/CPKKDTree.h
index 91082ebb6e..78015f3eed 100644
--- a/ColorPicker/ColorPicker/CPKKDTree.h
+++ b/ColorPicker/ColorPicker/CPKKDTree.h
@@ -35,7 +35,7 @@
*
* @param key An array of NSNumber objects with as many elements as the tree has dimensions.
*
- * @return The object assoicated with the point closest to |key| by Euclidean distance.
+ * @return The object associated with the point closest to |key| by Euclidean distance.
*/
- (id)nearestNeighborTo:(NSArray *)key;
diff --git a/ThirdParty/CGSInternal/CGSWindow.h b/ThirdParty/CGSInternal/CGSWindow.h
index cc72e0b0ff..f802eddd6e 100644
--- a/ThirdParty/CGSInternal/CGSWindow.h
+++ b/ThirdParty/CGSInternal/CGSWindow.h
@@ -186,7 +186,7 @@ CG_EXTERN CGError CGSWindowSetCanAccelerate(CGSConnectionID cid, CGSWindowID wid
#pragma mark system status items
-/*! Registers or unregisters a window as a global status item (see `NSStatusItem`, `NSMenuExtra`). Once a window is registered, the window server takes care of placing it in the apropriate location. */
+/*! Registers or unregisters a window as a global status item (see `NSStatusItem`, `NSMenuExtra`). Once a window is registered, the window server takes care of placing it in the appropriate location. */
CG_EXTERN CGError CGSRegisterWindowWithSystemStatusBar(CGSConnectionID cid, CGSWindowID wid, int priority);
CG_EXTERN CGError CGSUnregisterWindowWithSystemStatusBar(CGSConnectionID cid, CGSWindowID wid);
diff --git a/ThirdParty/SCEvents/Source/SCEvents.m b/ThirdParty/SCEvents/Source/SCEvents.m
index 8a2cca9d85..9307607a8d 100644
--- a/ThirdParty/SCEvents/Source/SCEvents.m
+++ b/ThirdParty/SCEvents/Source/SCEvents.m
@@ -98,7 +98,7 @@ - (id)init
* Flushes the event stream synchronously by sending events that have already
* occurred but not yet delivered.
*
- * @return A BOOL indicating the sucess or failure
+ * @return A BOOL indicating the success or failure
*/
- (BOOL)flushEventStreamSync
{
@@ -121,7 +121,7 @@ - (BOOL)flushEventStreamSync
* Flushes the event stream asynchronously by sending events that have already
* occurred but not yet delivered.
*
- * @return A BOOL indicating the sucess or failure
+ * @return A BOOL indicating the success or failure
*/
- (BOOL)flushEventStreamAsync
{
diff --git a/iTerm2XCTests/VT100ScreenTest.m b/iTerm2XCTests/VT100ScreenTest.m
index bfdca64599..b91d7b5fe0 100644
--- a/iTerm2XCTests/VT100ScreenTest.m
+++ b/iTerm2XCTests/VT100ScreenTest.m
@@ -122,7 +122,7 @@ - (void)testInit {
XCTAssert([s length] == 0);
}
- // Append some stuff to it to make sure we can retreive it.
+ // Append some stuff to it to make sure we can retrieve it.
for (int i = 0; i < [screen height] - 1; i++) {
[screen terminalAppendString:[NSString stringWithFormat:@"Line %d", i]];
[screen terminalLineFeed];
diff --git a/plists/PresetKeyMappings.plist b/plists/PresetKeyMappings.plist
index b188561990..643b2b5cfe 100644
--- a/plists/PresetKeyMappings.plist
+++ b/plists/PresetKeyMappings.plist
@@ -631,7 +631,7 @@
[1;6C
- Terminal.app Compatiblity
+ Terminal.app Compatibility
0x2d-0x40000
diff --git a/sources/AppleScriptTest.m b/sources/AppleScriptTest.m
index 958fee0057..13dde71f6e 100644
--- a/sources/AppleScriptTest.m
+++ b/sources/AppleScriptTest.m
@@ -171,7 +171,7 @@ - (void)testCreateWindowWithDefaultProfileAndCommand {
}
- (void)testSelectWindow {
- // Beccause windows are ordered by their z-position, the first window is
+ // Because windows are ordered by their z-position, the first window is
// the most recently created one. In the past, there was a "terminal
// windows" property that was ordered by creation time.
NSArray *commands = @[ @"create window with default profile",
diff --git a/sources/Autocomplete.m b/sources/Autocomplete.m
index 79be3765e6..bf1959605f 100644
--- a/sources/Autocomplete.m
+++ b/sources/Autocomplete.m
@@ -32,7 +32,7 @@ @implementation AutocompleteView
// Words before the word at the cursor.
NSMutableArray* context_;
- // x,y coords where prefix occured.
+ // x,y coords where prefix occurred.
int startX_;
long long startY_; // absolute coord
diff --git a/sources/LineBlock.m b/sources/LineBlock.m
index 9561915ecd..bebc40408c 100644
--- a/sources/LineBlock.m
+++ b/sources/LineBlock.m
@@ -747,8 +747,8 @@ - (int) _lineRawOffset: (int) anIndex
// Convert $ in a context where it refers to the end of string to kSuffixChar
// ^ is NOT start-of-string when:
// - it is escaped
- // - it is preceeded by an unescaped [
- // - it is preceeded by an unescaped [:
+ // - it is preceded by an unescaped [
+ // - it is preceded by an unescaped [:
// $ is NOT end-of-string when:
// - it is escaped
//
diff --git a/sources/LineBuffer.m b/sources/LineBuffer.m
index 1451e2299a..a99c0bf52f 100644
--- a/sources/LineBuffer.m
+++ b/sources/LineBuffer.m
@@ -454,7 +454,7 @@ - (int)copyLineToBuffer:(screen_char_t *)buffer
}
}
NSLog(@"Couldn't find line %d", lineNum);
- NSAssert(NO, @"Tried to get non-existant line");
+ NSAssert(NO, @"Tried to get non-existent line");
return NO;
}
@@ -507,7 +507,7 @@ - (ScreenCharArray *)wrappedLineAtIndex:(int)lineNum
}
}
NSLog(@"Couldn't find line %d", lineNum);
- NSAssert(NO, @"Tried to get non-existant line");
+ NSAssert(NO, @"Tried to get non-existent line");
return nil;
}
diff --git a/sources/MovePaneController.m b/sources/MovePaneController.m
index 2dfad81e86..1f9f1d0120 100644
--- a/sources/MovePaneController.m
+++ b/sources/MovePaneController.m
@@ -171,7 +171,7 @@ - (BOOL)dropInSession:(PTYSession *)dest
didSplit_ = YES;
if ([self.session isTmuxClient]) {
- // Do this after setting didSplit becasue a second call to this method
+ // Do this after setting didSplit because a second call to this method
// will happen no matter what and we want it to do nothing if we get
// here.
if (isMove_) {
diff --git a/sources/NSStringITerm.h b/sources/NSStringITerm.h
index fe7a91cd39..45123e2f5a 100644
--- a/sources/NSStringITerm.h
+++ b/sources/NSStringITerm.h
@@ -2,7 +2,7 @@
//
// NSStringJTerminal.h
//
-// Additional fucntion to NSString Class by Category
+// Additional function to NSString Class by Category
// 2001.11.13 by Y.Hanahara
// 2002.05.18 by Kiichi Kusama
/*
diff --git a/sources/NSStringITerm.m b/sources/NSStringITerm.m
index c0a6c4f815..fac73545bc 100644
--- a/sources/NSStringITerm.m
+++ b/sources/NSStringITerm.m
@@ -335,7 +335,7 @@ static int maximal_subpart_of_row(const unsigned char *datap,
return bytesInRow;
}
-// This function finds the longest intial sequence of bytes that look like a valid UTF-8 sequence.
+// This function finds the longest initial sequence of bytes that look like a valid UTF-8 sequence.
// It's used to gobble them up and replace them with a > replacement mark in an invalid sequence.
static int minimal_subpart(const unsigned char *datap, int datalen)
{
diff --git a/sources/PTYTab.m b/sources/PTYTab.m
index 360a8d7b71..fef5698b1f 100644
--- a/sources/PTYTab.m
+++ b/sources/PTYTab.m
@@ -2236,7 +2236,7 @@ + (__kindof NSView *)_recusiveRestoreSplitters:(NSDictionary *)a
NSString *uniqueId = [PTYSession guidInArrangement:arrangement[TAB_ARRANGEMENT_SESSION]];
if (windowPaneNumber && idMap[windowPaneNumber]) {
// Creating splitters for a tmux tab. The arrangement is marked
- // up with window pane IDs, whcih may or may not already exist.
+ // up with window pane IDs, which may or may not already exist.
// When restoring a tmux tab, then all session dicts in the
// arrangement have a window pane. The presence of a
// TAB_ARRANGEMENT_TMUX_WINDOW_PANE implies that theMap is
diff --git a/sources/PTYTask.h b/sources/PTYTask.h
index 0430f2585b..d3786bd432 100644
--- a/sources/PTYTask.h
+++ b/sources/PTYTask.h
@@ -91,7 +91,7 @@ extern NSString *kCoprocessStatusChangeNotification;
- (BOOL)tryToAttachToServerWithProcessId:(pid_t)thePid;
// Wire up the server as the task's file descriptor and process. The caller
-// will ahve connected to the server to get this info. Requires
+// will have connected to the server to get this info. Requires
// [iTermAdvancedSettingsModel runJobsInServers].
- (void)attachToServer:(iTermFileDescriptorServerConnection)serverConnection;
diff --git a/sources/PTYTask.m b/sources/PTYTask.m
index 44c02bc9f6..2c8eb2d603 100644
--- a/sources/PTYTask.m
+++ b/sources/PTYTask.m
@@ -1024,7 +1024,7 @@ - (NSString*)getWorkingDirectory {
}
}
if (ret <= 0) {
- // An error occured
+ // An error occurred
DLog(@"Failed with error %d", ret);
return nil;
} else if (ret != sizeof(vpi)) {
diff --git a/sources/PTYTextView.m b/sources/PTYTextView.m
index c9d90a526f..7e134b0e5a 100644
--- a/sources/PTYTextView.m
+++ b/sources/PTYTextView.m
@@ -1067,7 +1067,7 @@ - (BOOL)cursorVisible {
- (void)drawRect:(NSRect)rect {
BOOL savedCursorVisible = _drawingHelper.cursorVisible;
- // Try to use a saved grid if one is available. If it suceeds, that implies that the cursor was
+ // Try to use a saved grid if one is available. If it succeeds, that implies that the cursor was
// recently hidden and what we're drawing is how the screen looked just before the cursor was
// hidden. Therefore, we'll temporarily show the cursor, but we'll need to restore cursorVisible's
// value when we're done.
diff --git a/sources/PasteViewController.m b/sources/PasteViewController.m
index ebddf27f00..7a8a5a160f 100644
--- a/sources/PasteViewController.m
+++ b/sources/PasteViewController.m
@@ -30,7 +30,7 @@ - (instancetype)initWithContext:(PasteContext *)pasteContext
if (self) {
[self view];
- // Fix up frames beacuse the view is flipped.
+ // Fix up frames because the view is flipped.
for (NSView *view in [self.view subviews]) {
NSRect frame = [view frame];
frame.origin.y = NSMaxY([self.view bounds]) - NSMaxY([view frame]);
diff --git a/sources/PseudoTerminal.h b/sources/PseudoTerminal.h
index f8b812f142..2927785e2d 100644
--- a/sources/PseudoTerminal.h
+++ b/sources/PseudoTerminal.h
@@ -105,7 +105,7 @@ extern NSString *const kPseudoTerminalStateRestorationWindowArrangementKey;
savedWindowType:(iTermWindowType)savedWindowType
screen:(int)screenIndex;
-// isHotkey indicates if this is a hotkey window, which recieves special
+// isHotkey indicates if this is a hotkey window, which receives special
// treatment and must be unique.
- (instancetype)initWithSmartLayout:(BOOL)smartLayout
windowType:(iTermWindowType)windowType
diff --git a/sources/PseudoTerminal.m b/sources/PseudoTerminal.m
index e06d5c7f91..680a02ecd0 100644
--- a/sources/PseudoTerminal.m
+++ b/sources/PseudoTerminal.m
@@ -2845,7 +2845,7 @@ - (NSSize)windowWillResize:(NSWindow *)sender toSize:(NSSize)proposedFrameSize {
snapWidth = snapHeight = NO;
}
- // If resizing a full-width/height X-of-screen window in a direction perpindicular to the screen
+ // If resizing a full-width/height X-of-screen window in a direction perpendicular to the screen
// edge it's attached to, turn off snapping in the direction parallel to the edge.
if (windowType_ == WINDOW_TYPE_RIGHT || windowType_ == WINDOW_TYPE_LEFT) {
if (proposedFrameSize.height == self.window.frame.size.height) {
diff --git a/sources/SessionView.m b/sources/SessionView.m
index bd8ddd9b01..4db13cf8cd 100644
--- a/sources/SessionView.m
+++ b/sources/SessionView.m
@@ -206,7 +206,7 @@ - (void)setBackgroundDimmed:(BOOL)backgroundDimmed {
// It's very expensive for PTYTextView to own its own tracking events because its frame changes
// constantly, plus it can miss mouse exit events and spurious mouse enter events (issue 3345).
-// I beleive it also caused hangs (issue 3974).
+// I believe it also caused hangs (issue 3974).
- (void)updateTrackingAreas {
if ([self window]) {
int trackingOptions;
diff --git a/sources/TmuxController.m b/sources/TmuxController.m
index 65d406c88d..dcd05a704f 100644
--- a/sources/TmuxController.m
+++ b/sources/TmuxController.m
@@ -1208,7 +1208,7 @@ - (void)setAffinitiesFromString:(NSString *)result {
if (siblings.count == 1) {
// This is a wee hack. If a tmux Window is in a native window with one tab
// then create an equivalence class containing only (wid, wid+"_ph"). ph=placeholder
- // The equivalence class's existance signals not to apply the default mode for
+ // The equivalence class's existence signals not to apply the default mode for
// unrecognized windows.
exemplar = [exemplar stringByAppendingString:@"_ph"];
}
diff --git a/sources/ToolJobs.m b/sources/ToolJobs.m
index 4bd26d2d03..a1365bb4da 100644
--- a/sources/ToolJobs.m
+++ b/sources/ToolJobs.m
@@ -126,7 +126,7 @@ - (id)comboBox:(NSComboBox *)aComboBox objectValueForItemAtIndex:(NSInteger)inde
}
- (NSUInteger)comboBox:(NSComboBox *)aComboBox indexOfItemWithStringValue:(NSString *)aString {
if ([aString intValue] > 0) {
- return NSNotFound; // Without this, "1", "2", and "3" get replaced immediatly!
+ return NSNotFound; // Without this, "1", "2", and "3" get replaced immediately!
}
int sig = [[self class] signalForName:aString];
diff --git a/sources/VT100CSIParser.m b/sources/VT100CSIParser.m
index d53403c809..c9738782e4 100644
--- a/sources/VT100CSIParser.m
+++ b/sources/VT100CSIParser.m
@@ -118,7 +118,7 @@ static BOOL ParseCSIPrefix(iTermParserContext *context, CVector *incidentals, CS
//
// This description suggests that if the first byte of parameter bytes is one of
// '<', '=', '>', '?' (\x3c-\x3f), it's well-formed and could be considered
- // as private CSI extention.
+ // as private CSI extension.
//
// Example:
//
diff --git a/sources/VT100Grid.m b/sources/VT100Grid.m
index d0edc44f9a..ee9875bacc 100644
--- a/sources/VT100Grid.m
+++ b/sources/VT100Grid.m
@@ -2002,7 +2002,7 @@ - (NSString *)description {
[self class], self, size_.width, size_.height, cursor_.x, cursor_.y];
}
-// Returns NSString representation of line. This exists to faciliate debugging only.
+// Returns NSString representation of line. This exists to facilitate debugging only.
+ (NSString *)stringForScreenChars:(screen_char_t *)theLine length:(int)length
{
NSMutableString* result = [NSMutableString stringWithCapacity:length];
diff --git a/sources/VT100GridTypes.h b/sources/VT100GridTypes.h
index d671886e8f..1a4dcdac04 100644
--- a/sources/VT100GridTypes.h
+++ b/sources/VT100GridTypes.h
@@ -268,7 +268,7 @@ NS_INLINE long long VT100GridWindowedRangeLength(VT100GridWindowedRange range, i
int numFullLines = MAX(0, (range.coordRange.end.y - range.coordRange.start.y - 1));
return ((right - VT100GridWindowedRangeStart(range).x) + // Chars on first line
(VT100GridWindowedRangeEnd(range).x - left) + // Chars on second line
- range.columnWindow.length * numFullLines); // Chars inbetween
+ range.columnWindow.length * numFullLines); // Chars between
}
}
diff --git a/sources/VT100Screen.m b/sources/VT100Screen.m
index 0bd9a9d632..1cc2d1a4f7 100644
--- a/sources/VT100Screen.m
+++ b/sources/VT100Screen.m
@@ -1093,7 +1093,7 @@ - (void)linefeed
// more cooperation between VT100Screen and PTYTextView than is currently in place because
// the selection could become truncated, and regardless, will need to move up a line in terms
// of absolute Y position (normally when the screen scrolls the absolute Y position of the
- // selection stays the same and the viewport moves down, or else there is soem scrollback
+ // selection stays the same and the viewport moves down, or else there is some scrollback
// overflow and PTYTextView -refresh bumps the selection's Y position, but because in this
// case we don't append to the line buffer, scrollback overflow will not increment).
[delegate_ screenRemoveSelection];
diff --git a/sources/iTermFileDescriptorSocketPath.c b/sources/iTermFileDescriptorSocketPath.c
index 05abdc0c93..e78928b6fb 100644
--- a/sources/iTermFileDescriptorSocketPath.c
+++ b/sources/iTermFileDescriptorSocketPath.c
@@ -37,7 +37,7 @@ const char *iTermFileDescriptorSocketNamePrefix = "iTerm2.socket.";
//
// Based on that, we don't want /var/folders. That site makes another point about home directories:
// "There is a user cache in ~/Library/Caches and the only advantage I can see for '/var/folders'
-// is to have a cache that is not in the home folder, for example, to avoid transfering data over
+// is to have a cache that is not in the home folder, for example, to avoid transferring data over
// a network when using network homes"
//
// Obviously, a unix domain socket on a network path sounds like a bad idea (does it even work?)
diff --git a/sources/iTermFindOnPageHelper.m b/sources/iTermFindOnPageHelper.m
index aaffb3dcb5..263dd72026 100644
--- a/sources/iTermFindOnPageHelper.m
+++ b/sources/iTermFindOnPageHelper.m
@@ -95,7 +95,7 @@ - (void)findString:(NSString *)aString
// it results in drawing errors (drawing is clipped to the findbar for
// some reason). So we return YES and continueFind is run from a timer
// and everything works fine. The 100ms delay introduced is not
- // noticable.
+ // noticeable.
} else {
// Begin a brand new search.
if (_findInProgress) {
diff --git a/sources/iTermTabBarControlView.h b/sources/iTermTabBarControlView.h
index 798ffc40dd..2cf466ca8b 100644
--- a/sources/iTermTabBarControlView.h
+++ b/sources/iTermTabBarControlView.h
@@ -17,7 +17,7 @@
@end
-// A customized verison of PSMTabBarControl.
+// A customized version of PSMTabBarControl.
@interface iTermTabBarControlView : PSMTabBarControl
@property(nonatomic, assign) id itermTabBarDelegate;
diff --git a/tests/encoding_change.txt b/tests/encoding_change.txt
index ea2e8636ed..4353d21d48 100644
--- a/tests/encoding_change.txt
+++ b/tests/encoding_change.txt
@@ -1,3 +1,3 @@
C3+A5 in current encoding: å
-Latin-1: Capital A with tilde, Captial Y with double stroke: %@å
+Latin-1: Capital A with tilde, Capital Y with double stroke: %@å
UTF-8: Lowercase a with ring: %Gå