diff --git a/.gitignore b/.gitignore
index 516e279..a5810fc 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,3 +5,5 @@
Carthage/Checkouts
Carthage/Build
MacDist/*
+.DS_Store
+*.xcuserstate
diff --git a/iOCNotes.xcodeproj/project.pbxproj b/iOCNotes.xcodeproj/project.pbxproj
index 40eb943..f6d7d40 100644
--- a/iOCNotes.xcodeproj/project.pbxproj
+++ b/iOCNotes.xcodeproj/project.pbxproj
@@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
- objectVersion = 52;
+ objectVersion = 54;
objects = {
/* Begin PBXBuildFile section */
@@ -850,7 +850,7 @@
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
- CURRENT_PROJECT_VERSION = 1;
+ CURRENT_PROJECT_VERSION = 0;
DEBUG_INFORMATION_FORMAT = dwarf;
DEVELOPMENT_TEAM = NKUJUXUJ3B;
GCC_C_LANGUAGE_STANDARD = gnu11;
@@ -862,7 +862,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
- MARKETING_VERSION = 4.1.8;
+ MARKETING_VERSION = 4.1.9;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.peterandlinda.iOCNotes.ActionExtension;
@@ -888,7 +888,7 @@
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
COPY_PHASE_STRIP = NO;
- CURRENT_PROJECT_VERSION = 1;
+ CURRENT_PROJECT_VERSION = 0;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = NKUJUXUJ3B;
GCC_C_LANGUAGE_STANDARD = gnu11;
@@ -900,7 +900,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
- MARKETING_VERSION = 4.1.8;
+ MARKETING_VERSION = 4.1.9;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.peterandlinda.iOCNotes.ActionExtension;
@@ -1027,7 +1027,7 @@
CODE_SIGN_ENTITLEMENTS = iOCNotes/iOCNotes.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
- CURRENT_PROJECT_VERSION = 1;
+ CURRENT_PROJECT_VERSION = 0;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = NKUJUXUJ3B;
FRAMEWORK_SEARCH_PATHS = (
@@ -1041,7 +1041,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
- MARKETING_VERSION = 4.1.8;
+ MARKETING_VERSION = 4.2.0;
OTHER_LDFLAGS = "-ObjC";
PRODUCT_BUNDLE_IDENTIFIER = "com.peterandlinda.${TARGET_NAME:rfc1034identifier}";
PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)";
@@ -1063,7 +1063,7 @@
CODE_SIGN_ENTITLEMENTS = iOCNotes/iOCNotes.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
- CURRENT_PROJECT_VERSION = 1;
+ CURRENT_PROJECT_VERSION = 0;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = NKUJUXUJ3B;
FRAMEWORK_SEARCH_PATHS = (
@@ -1077,7 +1077,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
- MARKETING_VERSION = 4.1.8;
+ MARKETING_VERSION = 4.2.0;
OTHER_LDFLAGS = "-ObjC";
PRODUCT_BUNDLE_IDENTIFIER = "com.peterandlinda.${TARGET_NAME:rfc1034identifier}";
PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)";
diff --git a/iOCNotes.xcodeproj/project.xcworkspace/xcuserdata/marinofaggiana.xcuserdatad/UserInterfaceState.xcuserstate b/iOCNotes.xcodeproj/project.xcworkspace/xcuserdata/marinofaggiana.xcuserdatad/UserInterfaceState.xcuserstate
deleted file mode 100644
index 909ac32..0000000
Binary files a/iOCNotes.xcodeproj/project.xcworkspace/xcuserdata/marinofaggiana.xcuserdatad/UserInterfaceState.xcuserstate and /dev/null differ
diff --git a/iOCNotes.xcodeproj/project.xcworkspace/xcuserdata/marinofaggiana.xcuserdatad/xcdebugger/Expressions.xcexplist b/iOCNotes.xcodeproj/project.xcworkspace/xcuserdata/marinofaggiana.xcuserdatad/xcdebugger/Expressions.xcexplist
index 67ea63a..f157026 100644
--- a/iOCNotes.xcodeproj/project.xcworkspace/xcuserdata/marinofaggiana.xcuserdatad/xcdebugger/Expressions.xcexplist
+++ b/iOCNotes.xcodeproj/project.xcworkspace/xcuserdata/marinofaggiana.xcuserdatad/xcdebugger/Expressions.xcexplist
@@ -32,6 +32,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/iOCNotes/EditorViewController.swift b/iOCNotes/EditorViewController.swift
index 9efafd2..f64e1bd 100644
--- a/iOCNotes/EditorViewController.swift
+++ b/iOCNotes/EditorViewController.swift
@@ -388,7 +388,9 @@ extension EditorViewController: UITextViewDelegate {
var lineRemainder = ""
let precedingLineIndex = allLines.firstIndex { line in
if line.hasPrefix(precedingLineString) {
- lineRemainder = String(line.suffix(from: precedingLineString.endIndex))
+ let distance = precedingLineString.distance(from: precedingLineString.startIndex, to: precedingLineString.endIndex)
+ let indexSuffix = line.count - distance
+ lineRemainder = String(line.suffix(indexSuffix))
return true
}
return false