Auto scroll on log update
This commit is contained in:
parent
ef13cd0c83
commit
35840c56d0
|
@ -182,8 +182,10 @@ class ASProjDoc: NSDocument, NSOutlineViewDelegate {
|
||||||
var modified : AnyObject?
|
var modified : AnyObject?
|
||||||
if (url!.getResourceValue(&modified, forKey:NSURLAttributeModificationDateKey, error:nil)) {
|
if (url!.getResourceValue(&modified, forKey:NSURLAttributeModificationDateKey, error:nil)) {
|
||||||
if (modified as NSDate).compare(logModified) == .OrderedDescending {
|
if (modified as NSDate).compare(logModified) == .OrderedDescending {
|
||||||
var enc : UInt = 0
|
var enc : UInt = 0
|
||||||
editor.setString(NSString(contentsOfURL:url!, usedEncoding:&enc, error:nil))
|
let newText = NSString(contentsOfURL:url!, usedEncoding:&enc, error:nil)
|
||||||
|
editor.setString(newText)
|
||||||
|
editor.gotoLine(1000000000, column: 0, animated: true)
|
||||||
logModified = modified as NSDate
|
logModified = modified as NSDate
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user