Author: mlytwyn
Date: Wed Feb  3 00:26:13 2016
New Revision: 39330

URL: http://svn.gna.org/viewcvs/gnustep?rev=39330&view=rev
Log:
Additional merges with GUI main branch revision 39320: Source/NSLayoutManager.m 
Source/NSTextView.m

Modified:
    libs/gui/branches/gnustep_testplant_branch/Source/NSLayoutManager.m
    libs/gui/branches/gnustep_testplant_branch/Source/NSTextView.m

Modified: libs/gui/branches/gnustep_testplant_branch/Source/NSLayoutManager.m
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/gui/branches/gnustep_testplant_branch/Source/NSLayoutManager.m?rev=39330&r1=39329&r2=39330&view=diff
==============================================================================
--- libs/gui/branches/gnustep_testplant_branch/Source/NSLayoutManager.m 
(original)
+++ libs/gui/branches/gnustep_testplant_branch/Source/NSLayoutManager.m Wed Feb 
 3 00:26:13 2016
@@ -2639,7 +2639,7 @@
 
       if (!layout_char)
        new_last_glyph = 0;
-      else if (layout_char == [_textStorage length])
+      else if (layout_char >= [_textStorage length])
        new_last_glyph = [self numberOfGlyphs];
       else
        new_last_glyph = [self glyphRangeForCharacterRange: 
NSMakeRange(layout_char, 1)

Modified: libs/gui/branches/gnustep_testplant_branch/Source/NSTextView.m
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/gui/branches/gnustep_testplant_branch/Source/NSTextView.m?rev=39330&r1=39329&r2=39330&view=diff
==============================================================================
--- libs/gui/branches/gnustep_testplant_branch/Source/NSTextView.m      
(original)
+++ libs/gui/branches/gnustep_testplant_branch/Source/NSTextView.m      Wed Feb 
 3 00:26:13 2016
@@ -5178,27 +5178,23 @@
            ret = [pboard setString: [[self string] substringWithRange: 
_layoutManager->_selected_range] 
         forType: NSStringPboardType];
          }
-
-  if ([type isEqualToString: NSRTFPboardType])
+  else if ([type isEqualToString: NSRTFPboardType])
     {
       ret = [pboard setData: [self RTFFromRange: 
_layoutManager->_selected_range]
         forType: NSRTFPboardType];
     }
-
-  if ([type isEqualToString: NSRTFDPboardType])
+  else if ([type isEqualToString: NSRTFDPboardType])
     {
       ret = [pboard setData: [self RTFDFromRange: 
_layoutManager->_selected_range]
         forType: NSRTFDPboardType];
     }
-
-  if ([type isEqualToString: NSSmartPastePboardType] &&
+  else if ([type isEqualToString: NSSmartPastePboardType] &&
     [self selectionGranularity] == NSSelectByWord)
     {
       ret = [pboard setData: [NSData data]
         forType: NSSmartPastePboardType];
     }
-
-  if ([type isEqualToString: NSColorPboardType])
+  else if ([type isEqualToString: NSColorPboardType])
     {
       NSColor  *color;
 
@@ -5211,30 +5207,26 @@
           ret = YES;
         }
     }
-
-  if ([type isEqualToString: NSFontPboardType])
+  else if ([type isEqualToString: NSFontPboardType])
     {
       NSDictionary     *dict;
 
       dict = [_textStorage fontAttributesInRange: 
_layoutManager->_selected_range];
       if (dict != nil)
         {
-          [pboard setData: [NSArchiver archivedDataWithRootObject: dict]
+          ret = [pboard setData: [NSArchiver archivedDataWithRootObject: dict]
                forType: NSFontPboardType];
-          ret = YES;
         }
     }
-  
-  if ([type isEqualToString: NSRulerPboardType])
+  else if ([type isEqualToString: NSRulerPboardType])
     {
       NSDictionary     *dict;
 
       dict = [_textStorage rulerAttributesInRange: 
_layoutManager->_selected_range];
       if (dict != nil)
         {
-          [pboard setData: [NSArchiver archivedDataWithRootObject: dict]
+          ret = [pboard setData: [NSArchiver archivedDataWithRootObject: dict]
                forType: NSRulerPboardType];
-          ret = YES;
         }
     }
   
@@ -5951,7 +5943,7 @@
       
       NSSpellChecker *sp = [NSSpellChecker sharedSpellChecker];
       NSString *word = [[self string] substringWithRange: [self 
selectedRange]];
-      if ([sp checkSpellingOfString: word startingAt: 0].location != 
NSNotFound)
+      if (sp != nil && [sp checkSpellingOfString: word startingAt: 0].location 
!= NSNotFound)
        {
          /*NSArray *guesses = [sp guessesForWordRange: wordRange
            inString: [self string]


_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs

Reply via email to