Revision: 16391
http://sourceforge.net/p/skim-app/code/16391
Author: hofman
Date: 2026-07-23 09:29:44 +0000 (Thu, 23 Jul 2026)
Log Message:
-----------
safety valve to get search string in sample when compacting removed too many
characters
Modified Paths:
--------------
trunk/PDFSelection_SKExtensions.m
trunk/SKMainWindowController.m
Modified: trunk/PDFSelection_SKExtensions.m
===================================================================
--- trunk/PDFSelection_SKExtensions.m 2026-07-20 14:52:02 UTC (rev 16390)
+++ trunk/PDFSelection_SKExtensions.m 2026-07-23 09:29:44 UTC (rev 16391)
@@ -150,7 +150,7 @@
// Find instances of search string and "bold" them.
foundRange = NSMakeRange(i - start, [searchString length]);
- if ([[sample substringWithRange:foundRange] isEqualToString:searchString]
== NO) {
+ if (NSMaxRange(foundRange) > [sample length] || [[sample
substringWithRange:foundRange] isEqualToString:searchString] == NO) {
foundRange = [sample rangeOfString:searchString
options:NSBackwardsSearch range:NSMakeRange(0, MIN([searchString length] + i -
start, [sample length]))];
if (foundRange.location == NSNotFound)
foundRange = [sample rangeOfString:searchString];
Modified: trunk/SKMainWindowController.m
===================================================================
--- trunk/SKMainWindowController.m 2026-07-20 14:52:02 UTC (rev 16390)
+++ trunk/SKMainWindowController.m 2026-07-23 09:29:44 UTC (rev 16391)
@@ -1778,7 +1778,7 @@
- (BOOL)findString:(NSString *)string forward:(BOOL)forward {
PDFDocument *pdfDoc = [pdfView document];
- if ([pdfDoc isFinding]) {
+ if (0&[pdfDoc isFinding]) {
NSBeep();
return NO;
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit