• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

テキストエディタ「原稿」の場所


Commit MetaInfo

Revision84f38371ddfcf9dc4c708b5b37bb866777ae7298 (tree)
Time2012-08-30 09:28:17
Author二鏡 <haliccon@gmai...>
Commiter二鏡

Log Message

色々改善版

Change Summary

Incremental Difference

--- a/Manuscript/MSFindPanelController.mm
+++ b/Manuscript/MSFindPanelController.mm
@@ -256,7 +256,7 @@ static id _sid;
256256 return NSMakeRange(NSNotFound,0);
257257
258258 CFIndex i;
259- CFIndex first,last;
259+ CFIndex first = 0,last = 0;
260260 for(i=0;i<limit;i++)
261261 {
262262 if([invalidIndexes containsIndex: i] == NO)
--- a/Manuscript/MSLayoutBlockManager.mm
+++ b/Manuscript/MSLayoutBlockManager.mm
@@ -378,7 +378,7 @@ _outdatedCharacterRange(NSTextStorage *storage)
378378
379379 CFIndex location = 0;
380380 CFIndex idx = 0; // block index
381- CFIndex length;
381+ CFIndex length = 0;
382382
383383 if(syncCache_.valid())
384384 {
--- a/Manuscript/MSTextView.mm
+++ b/Manuscript/MSTextView.mm
@@ -208,7 +208,8 @@ static CGFloat cCaretInterval = 0.6;
208208 return;
209209 }
210210
211- NSPoint point = [self convertPointFromBase: [theEvent locationInWindow]];
211+ NSPoint point = [self convertPoint: [theEvent locationInWindow]
212+ fromView: nil];
212213 _dragState.onSelection = NO;
213214
214215 NSInteger clickCount = [theEvent clickCount];
@@ -283,7 +284,8 @@ static CGFloat cCaretInterval = 0.6;
283284 return;
284285 }
285286
286- NSPoint point = [self convertPointFromBase: [theEvent locationInWindow]];
287+ NSPoint point = [self convertPoint: [theEvent locationInWindow]
288+ fromView: nil];
287289
288290 if(_dragState.onSelection)
289291 {
@@ -598,9 +600,11 @@ static CGFloat cCaretInterval = 0.6;
598600 }
599601
600602 id subString = [storage attributedSubstringFromRange: range];
603+ [undoManager disableUndoRegistration];
601604 [self deleteCharactersInRange: range];
602605 [self insertText: subString
603606 replacementRange: NSMakeRange(index,0)];
607+ [undoManager enableUndoRegistration];
604608
605609 self.selectedRange = NSMakeRange(index, range.length);
606610 inputState.reset_selection_anchor();
--- a/Manuscript/MSTextView_Action.mm
+++ b/Manuscript/MSTextView_Action.mm
@@ -868,7 +868,9 @@ readObjectFromPasteboard(NSPasteboard *pboard, Class aClass)
868868 _dropState.dragging = YES;
869869
870870 BOOL isTail;
871- NSPoint point = [self convertPointFromBase: [sender draggingLocation]];
871+// NSPoint point = [self convertPointFromBase: [sender draggingLocation]];
872+ NSPoint point = [self convertPoint: [sender draggingLocation]
873+ fromView: nil];
872874 caretState.locator = [pager_ indexOfCharacterOfNearestBorderAtPoint: point
873875 isTail: &isTail];
874876
@@ -905,7 +907,8 @@ readObjectFromPasteboard(NSPasteboard *pboard, Class aClass)
905907 return NSDragOperationNone;
906908
907909 BOOL isTail;
908- NSPoint point = [self convertPointFromBase: [sender draggingLocation]];
910+ NSPoint point = [self convertPoint: [sender draggingLocation]
911+ fromView: nil];
909912 caretState.locator = [pager_ indexOfCharacterOfNearestBorderAtPoint: point
910913 isTail: &isTail];
911914 if(caretState.locator != NSNotFound)
--- a/Manuscript/Manuscript-Info.plist
+++ b/Manuscript/Manuscript-Info.plist
@@ -52,11 +52,11 @@
5252 <key>CFBundlePackageType</key>
5353 <string>APPL</string>
5454 <key>CFBundleShortVersionString</key>
55- <string>1.2.1</string>
55+ <string>1.2.2</string>
5656 <key>CFBundleSignature</key>
5757 <string>????</string>
5858 <key>CFBundleVersion</key>
59- <string>4</string>
59+ <string>f</string>
6060 <key>LSApplicationCategoryType</key>
6161 <string>public.app-category.productivity</string>
6262 <key>LSHasLocalizedDisplayName</key>
--- a/Manuscript/_GlyphLocator.mm
+++ b/Manuscript/_GlyphLocator.mm
@@ -48,7 +48,7 @@ void _GlyphBufferSpace::loadStage2metrics(CTFontOrientation orientation)
4848 {
4949 CGSize *advance_ptr = &(advances[0]);
5050 CGSize *translate_ptr = &translations[0];
51- GlyphMetricsCache *storage;
51+ GlyphMetricsCache *storage = NULL;
5252 GlyphMetricsLoader &loader = glyphLoader;
5353
5454 vector<AttributesAdapter>::const_iterator it = target->attributes.begin();
@@ -82,11 +82,14 @@ void _GlyphBufferSpace::loadStage2metrics(CTFontOrientation orientation)
8282 advances[i] = metric->advance;
8383 }
8484 }
85- }
86- loader.load(orientation);
87- loader.write_back(translate_ptr, advance_ptr);
88- loader.memory(storage);
89- loader.reset();
85+ }
86+ if(storage)
87+ {
88+ loader.load(orientation);
89+ loader.write_back(translate_ptr, advance_ptr);
90+ loader.memory(storage);
91+ loader.reset();
92+ }
9093 }
9194
9295 void _GlyphBufferSpace::loadStage3attributes()