anviking / chromatism Goto Github PK
View Code? Open in Web Editor NEWiOS Syntax Highlighting in Swift
License: MIT License
iOS Syntax Highlighting in Swift
License: MIT License
I am having an issue using storyboards with this library. I set the class of one of my VC's to JLTextViewController, but I have 2 separate views in my VC and I want to assign the textview to one of them. When I try to do this the view just loads with a black background without the textview. I think it has to do with the initializers in JLTextView but I am not sure how to fix it.
*** Assertion failure in -[JLTokenizer textStorage:willProcessEditing:range:changeInLength:]
Also says JLTokenizer.m:135
This was generated during load of my application (the view is loaded by storyboard at beginning). I just updated my files for the commits you made 13 hours ago. Looks like you broke something, or is there something I need to change as a result of updating?
Steps to reproduce:
The cursor will be positioned on the beginning of the desired line.
When you dismiss the keyboard after editing the text inside a JLTextView
, the view scrolls in a unwanted way.
Have barely looked at it, but it seems like tree-sitter/tree-sitter does everything I aimed for (and struggled with) when building Chromatism (Incremental parsing e.t.c).
Perhaps a swift wrapper could be possible.
Sadly grammars appear to require compiling though.
Adding this issue here as a personal reminder.
Required support for line numbers.
I have a requirement. I need highlight my JSON output inside the textview, but textview seems not support horizontally scroll. Because I want show a string completely in one line, don't want make a new line.
Here is the data that it being inserted into the JLTextView (in string form):
// IDEDetailViewController.h
// UnicornIDE
//
// Created by Andrew H on 10/1/13.
// Copyright (c) 2013 Andrew H. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "WhiteRaccoon.h"
#import "JLTextView.h"
@interface IDEDetailViewController : UIViewController <UISplitViewControllerDelegate, WRRequestDelegate, UITextViewDelegate>
{
IBOutlet JLTextView *myTextView;
}
@property (strong, nonatomic) id detailItem;
@property (weak, nonatomic) IBOutlet UILabel *detailDescriptionLabel;
@end
Here is the crash that is generated:
Incident Identifier:
CrashReporter Key:
Hardware Model: iPad3,2
Process: UnicornIDE [2473]
Path:
Identifier:
Version: 1.0 (1.0)
Code Type: ARM (Native)
Parent Process: debugserver [2472]
Date/Time: 2013-10-01 21:56:34.818 -0400
OS Version: iOS 7.0.2 (11A501)
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Triggered by Thread: 0
Last Exception Backtrace:
0 CoreFoundation 0x2de34f4e __exceptionPreprocess + 126
1 libobjc.A.dylib 0x386436aa objc_exception_throw + 34
2 CoreFoundation 0x2de34e90 +[NSException raise:format:] + 100
3 Foundation 0x2e757118 -[NSRLEArray objectAtIndex:effectiveRange:] + 116
4 Foundation 0x2e765f0c -[NSMutableAttributedString removeAttribute:range:] + 120
5 UIFoundation 0x3593b6f0 __47-[NSConcreteTextStorage removeAttribute:range:]_block_invoke + 176
6 UIFoundation 0x3593b562 -[NSConcreteTextStorage removeAttribute:range:] + 162
7 UnicornIDE 0x000dee28 -[JLTokenizer clearColorAttributesInRange:textStorage:] (JLTokenizer.m:273)
8 UnicornIDE 0x000de3ac -[JLTokenizer tokenizeTextStorage:withRange:] (JLTokenizer.m:203)
9 UnicornIDE 0x000dde08 __45-[JLTokenizer scope:didChangeIndexesFrom:to:]_block_invoke (JLTokenizer.m:165)
10 Foundation 0x2e7ec7da __NSIndexSetEnumerate + 818
11 Foundation 0x2e7b47f0 -[NSIndexSet enumerateRangesWithOptions:usingBlock:] + 72
12 UnicornIDE 0x000ddd6e -[JLTokenizer scope:didChangeIndexesFrom:to:] (JLTokenizer.m:164)
13 UnicornIDE 0x000df96a -[JLTokenPattern performInIndexSet:] (JLTokenPattern.m:75)
14 UnicornIDE 0x000ce39c -[JLScope iterateSubscopes] (JLScope.m:60)
15 UnicornIDE 0x000ce6e0 -[JLScope perform] (JLScope.m:75)
16 UnicornIDE 0x000de530 -[JLTokenizer tokenizeTextStorage:withRange:] (JLTokenizer.m:209)
17 UnicornIDE 0x000de352 -[JLTokenizer tokenizeWithRange:] (JLTokenizer.m:197)
18 UnicornIDE 0x000dda26 -[JLTokenizer textStorage:didProcessEditing:range:changeInLength:] (JLTokenizer.m:146)
19 UIFoundation 0x359392d4 -[NSTextStorage processEditing] + 348
20 UIFoundation 0x35938f08 -[NSTextStorage endEditing] + 76
21 UIKit 0x3064c058 -[UITextView setAttributedText:] + 248
22 UIKit 0x3064bf46 -[UITextView setText:] + 130
23 UnicornIDE 0x000cd8a0 -[IDEDetailViewController requestCompleted:] (IDEDetailViewController.m:101)
24 UnicornIDE 0x000e3b3e -[WRRequestDownload stream:handleEvent:] (WhiteRaccoon.m:449)
25 CoreFoundation 0x2ddc69de _signalEventSync + 114
26 CoreFoundation 0x2ddc695a _cfstream_shared_signalEventSync + 330
27 CoreFoundation 0x2de00186 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 10
28 CoreFoundation 0x2ddff6dc __CFRunLoopDoSources0 + 336
29 CoreFoundation 0x2ddfde4a __CFRunLoopRun + 618
30 CoreFoundation 0x2dd68ce2 CFRunLoopRunSpecific + 518
31 CoreFoundation 0x2dd68ac6 CFRunLoopRunInMode + 102
32 GraphicsServices 0x32a6327e GSEventRunModal + 134
33 UIKit 0x3060aa3c UIApplicationMain + 1132
34 UnicornIDE 0x000d0dac main (main.m:16)
35 libdyld.dylib 0x38b4bab2 tlv_initializer + 2
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x38c021fc __pthread_kill + 8
1 libsystem_pthread.dylib 0x38c6ba2e pthread_kill + 54
2 libsystem_c.dylib 0x38bb2ff8 abort + 72
3 UnicornIDE 0x000eb8ae uncaught_exception_handler + 22
4 CoreFoundation 0x2de35254 __handleUncaughtException + 576
5 libobjc.A.dylib 0x3864390c _objc_terminate() + 172
6 libc++abi.dylib 0x37ef81c4 std::__terminate(void (*)()) + 76
7 libc++abi.dylib 0x37ef7d28 __cxa_rethrow + 96
8 libobjc.A.dylib 0x386437f2 objc_exception_rethrow + 38
9 CoreFoundation 0x2dd68d58 CFRunLoopRunSpecific + 636
10 CoreFoundation 0x2dd68ac6 CFRunLoopRunInMode + 102
11 GraphicsServices 0x32a6327e GSEventRunModal + 134
12 UIKit 0x3060aa3c UIApplicationMain + 1132
13 UnicornIDE 0x000d0dac main (main.m:16)
14 libdyld.dylib 0x38b4bab4 start + 0
Thread 1:
0 libsystem_kernel.dylib 0x38bef83c kevent64 + 24
1 libdispatch.dylib 0x38b30220 _dispatch_mgr_invoke + 228
2 libdispatch.dylib 0x38b2ffa6 _dispatch_mgr_thread$VARIANT$mp + 34
Thread 2 name: com.apple.NSURLConnectionLoader
Thread 2:
0 libsystem_kernel.dylib 0x38befa8c mach_msg_trap + 20
1 libsystem_kernel.dylib 0x38bef888 mach_msg + 44
2 CoreFoundation 0x2ddff7c6 __CFRunLoopServiceMachPort + 150
3 CoreFoundation 0x2ddfdeec __CFRunLoopRun + 780
4 CoreFoundation 0x2dd68ce2 CFRunLoopRunSpecific + 518
5 CoreFoundation 0x2dd68ac6 CFRunLoopRunInMode + 102
6 Foundation 0x2e7a2492 +[NSURLConnection(Loader) _resourceLoadLoop:] + 314
7 Foundation 0x2e817e22 __NSThread__main__ + 1058
8 libsystem_pthread.dylib 0x38c6ac1a _pthread_body + 138
9 libsystem_pthread.dylib 0x38c6ab8a _pthread_start + 98
10 libsystem_pthread.dylib 0x38c68c8c thread_start + 4
Thread 3 name: com.apple.CFSocket.private
Thread 3:
0 libsystem_kernel.dylib 0x38c02440 select$DARWIN_EXTSN + 20
1 CoreFoundation 0x2de03688 __CFSocketManager + 480
2 libsystem_pthread.dylib 0x38c6ac1a _pthread_body + 138
3 libsystem_pthread.dylib 0x38c6ab8a _pthread_start + 98
4 libsystem_pthread.dylib 0x38c68c8c thread_start + 4
Thread 4:
0 libsystem_kernel.dylib 0x38c02c7c __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x38c68dc6 _pthread_wqthread + 306
2 libsystem_pthread.dylib 0x38c68c80 start_wqthread + 4
Thread 5:
0 libsystem_kernel.dylib 0x38c02c7c __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x38c68dc6 _pthread_wqthread + 306
2 libsystem_pthread.dylib 0x38c68c80 start_wqthread + 4
Thread 6:
0 libsystem_kernel.dylib 0x38c02c7c __workq_kernreturn + 8
1 libsystem_pthread.dylib 0x38c68dc6 _pthread_wqthread + 306
2 libsystem_pthread.dylib 0x38c68c80 start_wqthread + 4
Thread 0 crashed with ARM Thread State (32-bit):
r0: 0x00000000 r1: 0x00000000 r2: 0x00000000 r3: 0xffffffff
r4: 0x00000006 r5: 0x3aac818c r6: 0x16582390 r7: 0x27d3e8f4
r8: 0x30ba60da r9: 0x3aac8e30 r10: 0x30b8b457 r11: 0x00000024
ip: 0x00000148 sp: 0x27d3e8e8 lr: 0x38c6ba33 pc: 0x38c021fc
cpsr: 0x00000010
Binary Images:
0xc5000 - 0xfcfff UnicornIDE armv7 <ac461497bd2038538b3ec39d521bc334> /var/mobile/Applications/8086B24A-4BDB-4D84-9D77-89ED52B7200E/UnicornIDE.app/UnicornIDE
0x2bec0000 - 0x2bee0fff dyld armv7 <b37cba000c7d3f8ea414f060d45ce144> /usr/lib/dyld
0x2cd72000 - 0x2cd72fff Accelerate armv7 <8e17835efc9234da89e3080c47fad906> /System/Library/Frameworks/Accelerate.framework/Accelerate
0x2cd7c000 - 0x2cf48fff vImage armv7 <a0e38e04253d345684ae9b6020775c4a> /System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/vImage
0x2cf49000 - 0x2d022fff libBLAS.dylib armv7 <98fa9344fcaf36cea0171bd98b2d4aa1> /System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/libBLAS.dylib
0x2d023000 - 0x2d2dbfff libLAPACK.dylib armv7 <b3eb717cd5263db1887946fd376f5c61> /System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/libLAPACK.dylib
0x2d2dc000 - 0x2d34afff libvDSP.dylib armv7 <37739741965d36df9f8274ecaa63da77> /System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/libvDSP.dylib
0x2d34b000 - 0x2d35cfff libvMisc.dylib armv7 <f24c84c7c0d43396a3c36a8dc10631b2> /System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/libvMisc.dylib
0x2d35d000 - 0x2d35dfff vecLib armv7 <75820262401c3e648868525cca914352> /System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/vecLib
0x2d35e000 - 0x2d37dfff Accounts armv7 <a7f9dbb770a935da8aeef3147008d228> /System/Library/Frameworks/Accounts.framework/Accounts
0x2d37f000 - 0x2d3e4fff AddressBook armv7 <cf3989e9ed653dada8722b9be66ad4dc> /System/Library/Frameworks/AddressBook.framework/AddressBook
0x2d9f8000 - 0x2dafdfff CFNetwork armv7 <0ad158ad8b7a3716ad04ffde6081754c> /System/Library/Frameworks/CFNetwork.framework/CFNetwork
0x2dafe000 - 0x2db58fff CoreAudio armv7 <6225db0da4413421aaa89153ba450c90> /System/Library/Frameworks/CoreAudio.framework/CoreAudio
0x2db70000 - 0x2dd60fff CoreData armv7 <9338ccb7c0f2377196e181eb10b15ef5> /System/Library/Frameworks/CoreData.framework/CoreData
0x2dd61000 - 0x2dea3ff0 CoreFoundation armv7 <07d59682d03432968770bffefd2c815c> /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation
0x2dea4000 - 0x2dfc7fff CoreGraphics armv7 <17a70d032a013c06b9a4d244b100e2b3> /System/Library/Frameworks/CoreGraphics.framework/CoreGraphics
0x2dfc9000 - 0x2e004fff libCGFreetype.A.dylib armv7 <e1ff3ccaaccc39dfa4cd7e3719314f6d> /System/Library/Frameworks/CoreGraphics.framework/Resources/libCGFreetype.A.dylib
0x2e006000 - 0x2e010fff libCMSBuiltin.A.dylib armv7 <8078a6ca43cf33ca8d492235e4667e0b> /System/Library/Frameworks/CoreGraphics.framework/Resources/libCMSBuiltin.A.dylib
0x2e1f5000 - 0x2e20ffff libRIP.A.dylib armv7 <45be0a70afaf3e1b9a13224586dbed40> /System/Library/Frameworks/CoreGraphics.framework/Resources/libRIP.A.dylib
0x2e210000 - 0x2e2e8fff CoreImage armv7 <fdcca382500736018a9f9f961bc6392d> /System/Library/Frameworks/CoreImage.framework/CoreImage
0x2e36e000 - 0x2e3e5fff CoreMedia armv7 <1b6527d74a8f3e479ec8cd584888f849> /System/Library/Frameworks/CoreMedia.framework/CoreMedia
0x2e48f000 - 0x2e4e7fff CoreTelephony armv7 <d107caef682837db925155f5d5e8f9f2> /System/Library/Frameworks/CoreTelephony.framework/CoreTelephony
0x2e4e8000 - 0x2e577fff CoreText armv7 <78fd8459373136a996acfedf16dea79e> /System/Library/Frameworks/CoreText.framework/CoreText
0x2e578000 - 0x2e587fff CoreVideo armv7 <66912be625e536beb4879d4125a681e4> /System/Library/Frameworks/CoreVideo.framework/CoreVideo
0x2e74a000 - 0x2e934fff Foundation armv7 <75c827267c5a3c85a3b21a9459d3c312> /System/Library/Frameworks/Foundation.framework/Foundation
0x2eb12000 - 0x2eb68fff IOKit armv7 <61defd9f540b33ddae0da730991b2334> /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit
0x2eb69000 - 0x2ed7afff ImageIO armv7 <029c569d9e7d396186ced04e1a052ace> /System/Library/Frameworks/ImageIO.framework/ImageIO
0x2ed7b000 - 0x2efc0fff JavaScriptCore armv7 <dc0125a288093a09a8d5920e4b4612d5> /System/Library/Frameworks/JavaScriptCore.framework/JavaScriptCore
0x2f064000 - 0x2f068fff MediaAccessibility armv7 <b5462d53f10b323aaccd9d027d91b9e3> /System/Library/Frameworks/MediaAccessibility.framework/MediaAccessibility
0x2f5a6000 - 0x2f609fff MobileCoreServices armv7 <5d5b5ca6dd7a305688d5a4d47363d534> /System/Library/Frameworks/MobileCoreServices.framework/MobileCoreServices
0x30030000 - 0x30038fff OpenGLES armv7 <dd01b8dc7a1539688780b2795bdf427d> /System/Library/Frameworks/OpenGLES.framework/OpenGLES
0x3003a000 - 0x3003afff libCVMSPluginSupport.dylib armv7 <c2d7372171823801bf538db28c21999f> /System/Library/Frameworks/OpenGLES.framework/libCVMSPluginSupport.dylib
0x3003e000 - 0x30041fff libCoreVMClient.dylib armv7 <8ebc1381120a37f3b906460e454c053e> /System/Library/Frameworks/OpenGLES.framework/libCoreVMClient.dylib
0x30042000 - 0x30049fff libGFXShared.dylib armv7 <cc38060b9cb638a8967390dbf31a0253> /System/Library/Frameworks/OpenGLES.framework/libGFXShared.dylib
0x3004a000 - 0x30088fff libGLImage.dylib armv7 <03b6bdbfab203bd781022577192dd929> /System/Library/Frameworks/OpenGLES.framework/libGLImage.dylib
0x30223000 - 0x30366fff QuartzCore armv7 <797ea739f9603601879decaf5d214372> /System/Library/Frameworks/QuartzCore.framework/QuartzCore
0x303c0000 - 0x30400fff Security armv7 <492fcd48d4de3f29b01799ace718d3d7> /System/Library/Frameworks/Security.framework/Security
0x30549000 - 0x30598fff SystemConfiguration armv7 <c939f4780d0e33679b30827d0c2ebbc5> /System/Library/Frameworks/SystemConfiguration.framework/SystemConfiguration
0x3059b000 - 0x30cbafff UIKit armv7 <f2c18b56be74371c9d93acf52376113c> /System/Library/Frameworks/UIKit.framework/UIKit
0x30cbb000 - 0x30d08fff VideoToolbox armv7 <4d2d394879a039cba6b25fa07cea3c0f> /System/Library/Frameworks/VideoToolbox.framework/VideoToolbox
0x31082000 - 0x31086fff AggregateDictionary armv7 <f5e364909f7a3981ab4a11d492e0bdb4> /System/Library/PrivateFrameworks/AggregateDictionary.framework/AggregateDictionary
0x31605000 - 0x31642fff AppSupport armv7 <5faf13cdd51b3b8399d43ac919129b34> /System/Library/PrivateFrameworks/AppSupport.framework/AppSupport
0x31763000 - 0x3176ffff AssetsLibraryServices armv7 <68e1b5f4b98237cd8c53494c22c0c867> /System/Library/PrivateFrameworks/AssetsLibraryServices.framework/AssetsLibraryServices
0x317b0000 - 0x317d3fff BackBoardServices armv7 <3140ec0752c03a53ae9aa4665ce5a76e> /System/Library/PrivateFrameworks/BackBoardServices.framework/BackBoardServices
0x317dd000 - 0x31801fff Bom armv7 <c44912a597933551bb2daaeeb4bc8ce9> /System/Library/PrivateFrameworks/Bom.framework/Bom
0x3198e000 - 0x31993fff CertUI armv7 <67cf3b4ea13538bca370f06d2052ab5a> /System/Library/PrivateFrameworks/CertUI.framework/CertUI
0x31ace000 - 0x31ad9fff CommonUtilities armv7 <6da0109d9f7a3e35a832df6767e9ca22> /System/Library/PrivateFrameworks/CommonUtilities.framework/CommonUtilities
0x31ada000 - 0x31adefff CommunicationsFilter armv7 <b479542c187b3947846beaf61a02e465> /System/Library/PrivateFrameworks/CommunicationsFilter.framework/CommunicationsFilter
0x31e39000 - 0x31e57fff CoreServicesInternal armv7 <a77ece9998e935c0ac1c5770f99dacdb> /System/Library/PrivateFrameworks/CoreServicesInternal.framework/CoreServicesInternal
0x31e58000 - 0x31e59fff CoreSurface armv7 <f0724e43692e325988fb0c7082b10dd6> /System/Library/PrivateFrameworks/CoreSurface.framework/CoreSurface
0x31f00000 - 0x31f5afff CoreUI armv7 <e84e33b988b830c194fe69dff1c7616a> /System/Library/PrivateFrameworks/CoreUI.framework/CoreUI
0x31fa8000 - 0x31fadfff CrashReporterSupport armv7 <bec9d042a104314494fb35c6c5e50382> /System/Library/PrivateFrameworks/CrashReporterSupport.framework/CrashReporterSupport
0x32176000 - 0x3218bfff DataAccessExpress armv7 <b0fe11aa7fe43047a573672c8f2ab922> /System/Library/PrivateFrameworks/DataAccessExpress.framework/DataAccessExpress
0x32195000 - 0x321acfff DataDetectorsCore armv7 <613d33dce9223141af4f0af37b6b70e8> /System/Library/PrivateFrameworks/DataDetectorsCore.framework/DataDetectorsCore
0x321ae000 - 0x321c6fff DataDetectorsUI armv7 <871c491ad56b3406b9fac1d58b99aec6> /System/Library/PrivateFrameworks/DataDetectorsUI.framework/DataDetectorsUI
0x321d1000 - 0x321ebfff DictionaryServices armv7 <dbe56830d9a832f08cfdf6854624e271> /System/Library/PrivateFrameworks/DictionaryServices.framework/DictionaryServices
0x3222d000 - 0x32238fff ExFAT armv7 <4bb821eb0d32387f85730dd89da93e6c> /System/Library/PrivateFrameworks/ExFAT.framework/ExFAT
0x32277000 - 0x32692fff FaceCore armv7 <e130060b925133d8b33aa9cb55da22d5> /System/Library/PrivateFrameworks/FaceCore.framework/FaceCore
0x32a5b000 - 0x32a6afff GraphicsServices armv7 <126bd20d3e42341b97a94adec2e2ce78> /System/Library/PrivateFrameworks/GraphicsServices.framework/GraphicsServices
0x32e13000 - 0x32e6dfff IMFoundation armv7 <541f97102570327b8a8becbd3730fbc5> /System/Library/PrivateFrameworks/IMFoundation.framework/IMFoundation
0x32e77000 - 0x32e7efff IOMobileFramebuffer armv7 <0f503c21e04532678e42152ecf727bed> /System/Library/PrivateFrameworks/IOMobileFramebuffer.framework/IOMobileFramebuffer
0x32e7f000 - 0x32e84fff IOSurface armv7 <a6746e35e609306ab5924a13a7c06916> /System/Library/PrivateFrameworks/IOSurface.framework/IOSurface
0x33257000 - 0x33262fff MobileAsset armv7 <6bd9b552b0583e569a83e227ae3f6c14> /System/Library/PrivateFrameworks/MobileAsset.framework/MobileAsset
0x332ad000 - 0x332b5fff MobileKeyBag armv7 <a3a2231b84183f308f4c147b80da452c> /System/Library/PrivateFrameworks/MobileKeyBag.framework/MobileKeyBag
0x332dd000 - 0x332e0fff MobileSystemServices armv7 <0cb34b63981a3fbd8caafe8a09be2162> /System/Library/PrivateFrameworks/MobileSystemServices.framework/MobileSystemServices
0x335a6000 - 0x335a8fff OAuth armv7 <628e21140abb3ee98b7cf857dcb174f7> /System/Library/PrivateFrameworks/OAuth.framework/OAuth
0x33d01000 - 0x33d3cfff OpenCL armv7 <80de57794ba230ef8d413ecc5dd4c309> /System/Library/PrivateFrameworks/OpenCL.framework/OpenCL
0x3471f000 - 0x3474cfff PhysicsKit armv7 <6333bd0b5a5e3f04be8a52d9c31afc12> /System/Library/PrivateFrameworks/PhysicsKit.framework/PhysicsKit
0x34839000 - 0x34870fff PrintKit armv7 <846f8f19164c30afb98616749ffce7c2> /System/Library/PrivateFrameworks/PrintKit.framework/PrintKit
0x34874000 - 0x348fbfff ProofReader armv7 <0b227cc84de73c2aa5e012eb81bfb988> /System/Library/PrivateFrameworks/ProofReader.framework/ProofReader
0x34bfe000 - 0x34c12fff SpringBoardServices armv7 <fea06e2952f03e43b6c3625e118a243a> /System/Library/PrivateFrameworks/SpringBoardServices.framework/SpringBoardServices
0x34fe9000 - 0x34febfff TCC armv7 <2b47e5554c8c3927bc4991388cf98834> /System/Library/PrivateFrameworks/TCC.framework/TCC
0x35035000 - 0x35056fff TelephonyUtilities armv7 <ec1a441b1ede3889bead180278dcde83> /System/Library/PrivateFrameworks/TelephonyUtilities.framework/TelephonyUtilities
0x35658000 - 0x3567cfff TextInput armv7 <591c2b2d192b377e8855495d7c33c2a9> /System/Library/PrivateFrameworks/TextInput.framework/TextInput
0x358d7000 - 0x35997fff UIFoundation armv7 <658cbbe6d12d3eb1b1ff5f7cfbdfa15d> /System/Library/PrivateFrameworks/UIFoundation.framework/UIFoundation
0x359af000 - 0x359b2fff UserFS armv7 <e5b8bfd317ae3447b8e3ede3b6dcc960> /System/Library/PrivateFrameworks/UserFS.framework/UserFS
0x35e2c000 - 0x368defff WebCore armv7 <9beae8ab77b43efc80b08628cce301f5> /System/Library/PrivateFrameworks/WebCore.framework/WebCore
0x368df000 - 0x3699ffff WebKit armv7 <09de3db4514d3cd399cc855058d81efa> /System/Library/PrivateFrameworks/WebKit.framework/WebKit
0x36ae3000 - 0x36aebfff XPCObjects armv7 <4070b1977b213d9fb09b45ed3c7ab6ec> /System/Library/PrivateFrameworks/XPCObjects.framework/XPCObjects
0x37a3e000 - 0x37a45fff libAccessibility.dylib armv7 <64f65a479836316393db4ad12c4ac16c> /usr/lib/libAccessibility.dylib
0x37c3e000 - 0x37c54fff libCRFSuite.dylib armv7 <8272a334233b31e3b416738002c4e865> /usr/lib/libCRFSuite.dylib
0x37c6a000 - 0x37c7ffff libMobileGestalt.dylib armv7 <c6a726fb44cb30ad82b9fe6c31d83b1a> /usr/lib/libMobileGestalt.dylib
0x37c9d000 - 0x37c9efff libSystem.B.dylib armv7 <b77969e583603737b5f7ba93b9be25f8> /usr/lib/libSystem.B.dylib
0x37d09000 - 0x37d35fff libTelephonyUtilDynamic.dylib armv7 <42f1e1d29ac73ef88ab6cd777425e0ff> /usr/lib/libTelephonyUtilDynamic.dylib
0x37e7e000 - 0x37e8afff libbsm.0.dylib armv7 <4859e28b9eb33c409d1afa4ad6a3b2db> /usr/lib/libbsm.0.dylib
0x37e8b000 - 0x37e94fff libbz2.1.0.dylib armv7 <f8cc302c9e7e389d9811feb8312831cb> /usr/lib/libbz2.1.0.dylib
0x37e95000 - 0x37ee0fff libc++.1.dylib armv7 <f3bbaff22aea3639b1b56589a9b986e8> /usr/lib/libc++.1.dylib
0x37ee1000 - 0x37efbfff libc++abi.dylib armv7 <cc45ccea2e6735fa929bf818fd5fe368> /usr/lib/libc++abi.dylib
0x37f0b000 - 0x37f12fff libcupolicy.dylib armv7 <9363fa178b453a6999c19c4ed5b80c45> /usr/lib/libcupolicy.dylib
0x3806b000 - 0x38158fff libiconv.2.dylib armv7 <7694ca0f13523dab8d4f5b5dfec6eda8> /usr/lib/libiconv.2.dylib
0x38159000 - 0x382aafff libicucore.A.dylib armv7 <a71e02a38e223dbdb0c8509a9cd70415> /usr/lib/libicucore.A.dylib
0x382b2000 - 0x382b2fff liblangid.dylib armv7 <d2f105737c3938c1a7afee7e7e7e4f86> /usr/lib/liblangid.dylib
0x382b3000 - 0x382bdfff liblockdown.dylib armv7 <455c91586e2b3f51ad257fda7adb6787> /usr/lib/liblockdown.dylib
0x3863b000 - 0x387dafff libobjc.A.dylib armv7 <581c944534fc3772be4f246562cbf75d> /usr/lib/libobjc.A.dylib
0x388a2000 - 0x388b7fff libresolv.9.dylib armv7 <f50dc125d0543dada59a21751e6857a0> /usr/lib/libresolv.9.dylib
0x388e0000 - 0x38976fff libsqlite3.dylib armv7 <c650e5808f683ed49e7b87d582f510c8> /usr/lib/libsqlite3.dylib
0x38977000 - 0x389c4fff libstdc++.6.dylib armv7 <cc8ef865e96135f4985fcf5836e6de69> /usr/lib/libstdc++.6.dylib
0x389c5000 - 0x389ebfff libtidy.A.dylib armv7 <b9007164b2003c00a70e3d045bdf3081> /usr/lib/libtidy.A.dylib
0x389ef000 - 0x38aa2fff libxml2.2.dylib armv7 <057e404ab40f37b7be1c874a0e063b42> /usr/lib/libxml2.2.dylib
0x38aa3000 - 0x38ac4fff libxslt.1.dylib armv7 <a9141d75b62b31468a1080142c27fa56> /usr/lib/libxslt.1.dylib
0x38ac5000 - 0x38ad1fff libz.1.dylib armv7 <65bcd248b0d137e8b6bd768dec21c9d5> /usr/lib/libz.1.dylib
0x38ad2000 - 0x38ad6fff libcache.dylib armv7 <0954da4d78e2364395be033364dfc123> /usr/lib/system/libcache.dylib
0x38ad7000 - 0x38adffff libcommonCrypto.dylib armv7 <d68d65088c5c3d25a23ed15c669f92ee> /usr/lib/system/libcommonCrypto.dylib
0x38ae0000 - 0x38ae4fff libcompiler_rt.dylib armv7 <6448ddee896a37fbbcaa1dd9bf1214bc> /usr/lib/system/libcompiler_rt.dylib
0x38ae5000 - 0x38aebfff libcopyfile.dylib armv7 <6b81b83f9348382da81f413a486ebeca> /usr/lib/system/libcopyfile.dylib
0x38aec000 - 0x38b24fff libcorecrypto.dylib armv7 <4184d9d49baa3abdaff0ea23e1ab88fd> /usr/lib/system/libcorecrypto.dylib
0x38b25000 - 0x38b49fff libdispatch.dylib armv7 <8797517044003c82bc32e5c3f0b2bc23> /usr/lib/system/libdispatch.dylib
0x38b4a000 - 0x38b4bfff libdyld.dylib armv7 <7d033fe14ede3994bd8b2d22954957b1> /usr/lib/system/libdyld.dylib
0x38b4c000 - 0x38b4cfff libkeymgr.dylib armv7 <3861c940b81c38729be115a9a96d192e> /usr/lib/system/libkeymgr.dylib
0x38b4d000 - 0x38b53fff liblaunch.dylib armv7 <df0e1c5b04ef39bc84b7faa72b842a1b> /usr/lib/system/liblaunch.dylib
0x38b54000 - 0x38b57fff libmacho.dylib armv7 <0720f441862c36f7af4212317e0187d8> /usr/lib/system/libmacho.dylib
0x38b58000 - 0x38b59fff libremovefile.dylib armv7 <18a3a1b372ef3ef2baee6f893f190b88> /usr/lib/system/libremovefile.dylib
0x38b5a000 - 0x38b67fff libsystem_asl.dylib armv7 <5bacbbe4a164398899a518ceaed62a08> /usr/lib/system/libsystem_asl.dylib
0x38b68000 - 0x38b68fff libsystem_blocks.dylib armv7 <9b849637d37d32a0a9d74468879a119b> /usr/lib/system/libsystem_blocks.dylib
0x38b69000 - 0x38bcbfff libsystem_c.dylib armv7 <8bee3aed784b335b947ea58efd18fe72> /usr/lib/system/libsystem_c.dylib
0x38bcc000 - 0x38bcefff libsystem_configuration.dylib armv7 <acfcdc55e6a13df99b2e6fb4d7b5657c> /usr/lib/system/libsystem_configuration.dylib
0x38bcf000 - 0x38bd5fff libsystem_dnssd.dylib armv7 <ac3df397c7333f03a0efe2611f2cdc71> /usr/lib/system/libsystem_dnssd.dylib
0x38bd6000 - 0x38beefff libsystem_info.dylib armv7 <1f4a5af043063cb3b72fa378fa896411> /usr/lib/system/libsystem_info.dylib
0x38bef000 - 0x38c07fff libsystem_kernel.dylib armv7 <70914815e51837a88186ab169e953e1b> /usr/lib/system/libsystem_kernel.dylib
0x38c08000 - 0x38c27fff libsystem_m.dylib armv7 <7f65ee6af4623db2af98332502653ad5> /usr/lib/system/libsystem_m.dylib
0x38c28000 - 0x38c39fff libsystem_malloc.dylib armv7 <34fc1e7733133750839e4bdb4adccbac> /usr/lib/system/libsystem_malloc.dylib
0x38c3a000 - 0x38c59fff libsystem_network.dylib armv7 <630896f734dc39eab7aab778a502b126> /usr/lib/system/libsystem_network.dylib
0x38c5a000 - 0x38c61fff libsystem_notify.dylib armv7 <c130b85a96f030febf3652c2a083f114> /usr/lib/system/libsystem_notify.dylib
0x38c62000 - 0x38c67fff libsystem_platform.dylib armv7 <4171679c14a831ada1cf2b16b7d54130> /usr/lib/system/libsystem_platform.dylib
0x38c68000 - 0x38c6dfff libsystem_pthread.dylib armv7 <25d8e09672333cd78db936d8e2919e54> /usr/lib/system/libsystem_pthread.dylib
0x38c6e000 - 0x38c6ffff libsystem_sandbox.dylib armv7 <401d3800ef733ab596d6393e73aa5c3a> /usr/lib/system/libsystem_sandbox.dylib
0x38c70000 - 0x38c72fff libsystem_stats.dylib armv7 <b0dac4be6c9839dd91045dc21d8968e0> /usr/lib/system/libsystem_stats.dylib
0x38c73000 - 0x38c73fff libunwind.dylib armv7 <b4083a94d4f036d7a9f76d16a0eca556> /usr/lib/system/libunwind.dylib
0x38c74000 - 0x38c8efff libxpc.dylib armv7 <0dd3689633b33d3c845e5e74d7f22dd2> /usr/lib/system/libxpc.dylib
NSException Description:
*** Terminating app due to uncaught exception 'NSRangeException', reason: 'NSMutableRLEArray objectAtIndex:effectiveRange:: Out of bounds'
Something logged just before crash:
Removed Indexes:<NSMutableIndexSet: 0x16695290>[number of indexes: 436 (in 2 ranges), indexes: (3429-3618 3621-3866)]
I have not been able to find a trigger for this crash yet.
The cursor is hard to position, especially near the end of the line.
CocoaPods is the dependency manager for Objective-C projects.
With CocoaPods it would very easy to implement Chromatism into an existing project.
Here's a link to CocoaPods: http://cocoapods.org
i need a demo to use it
I think in most files (if not all) you don't need to import UIKit. It should be enough to import Foundation. Then this code could also be used on the Mac.
The tab width of core text is much longer than that of the UITextView, resulting in a large misalignment when pressing the tab key.
Typing text onto a line which is already quite long results in the line taking a long time to redraw and thus it takes about a second or two for the new letter to appear. When typing quickly this results in a long delay.
Briefly looked at highlight.js - seems doable.
Steps to reproduce:
Keys won't work. But LEFT and RIGHT work.
Steps to reproduce:
Under the line you will see the second phantom cursor.
The syntax highlighting is performed as operations in a NSOperationQueue
. JLTokenPattern
does dispatch_async
to the main queue before adding the attribute to the textStorage, so calling -waitUntilFinished
on the operationQueue is not helpful.
Could probably be solved in a hacky way, but thinking about reimplementing the JLScopeDelegate
, moving add-attribute-to-textStorage-logic to the tokenizer, and adding some queue-logic-things there.
Since the last update an overflow whereby a single line requires multiple rows causes the caret to be misaligned with the drawn text.
Type "2" at the end of a line containing "01\n".
This looks all right in the simulator, but the console shows this:
2013-04-18 17:11:03.150 Chromatism[38270:c07] Current line: 1 2013-04-18 17:11:03.153 Chromatism[38270:c07] Length of current line #1 is: 4 2013-04-18 17:11:03.154 Chromatism[38270:c07] Current line contains "01 0"
The current line contains "01\n0" instead of the expected "012\n". The 0 in the end is the first character of the next line.
There is no need creating a new typesetter, but we cannot use the old one.
Solution: use something else than a CTTypesetter, or split the attributed string into segments of hard line-breaks.
- (void)wordWrapLineWithIndex:(int)index
{
NSRange lineRange = [self rangeOfLineWithIndex:index];
NSLog(@"Word wrapping on line:\"%@\"",[self.attributedString.string substringWithRange:lineRange]);
CGRect insetBounds = CGRectInset([self bounds], MARGIN, MARGIN);
CGFloat boundsWidth = CGRectGetWidth(insetBounds);
// Calculate the lines
CFIndex start = lineRange.location;
CFIndex currentIndex = index;
NSUInteger length = CFAttributedStringGetLength((__bridge CFAttributedStringRef)(self.attributedString));
NSLog(@"Deleting the first line with an index of %li", currentIndex);
[self deleteLineWithNumber:index];
// This is very time-consuming, but reusing the old framesetter seem to cause trouble.
CTTypesetterRef typesetter = CTTypesetterCreateWithAttributedString((__bridge CFAttributedStringRef)(self.attributedString));
Hello Anviking.
This is nice project. Have you tested with iOS8? After build and run on iOS8 when I try to place the caret right after the Text Edit receive the focus, it scrolls a few pixels.
Any idea what could be wrong?
Definitely related to #10
Sometimes, only part of the text is highlighted. Something like this is often logged when this happens:
Removed Indexes:<NSMutableIndexSet: 0x14eca9b0>[number of indexes: 106 (in 1 ranges), indexes: (0-105)]
In case it means anything, it was being highlighted up to about character 105 (see log). Sometimes none of the text is highlighted and something like this is logged:
Removed Indexes:<NSMutableIndexSet: 0x14dacef0>[number of indexes: 306 (in 2 ranges), indexes: (8086-8299 8302-8393)]
When it works perfectly, nothing was logged or Removed Indexes:<NSMutableIndexSet: 0x176d2b10>(no indexes)
was logged
Lines are not deleted.
Steps to reproduce:
Auto indentation won't work.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.