public
Description: A handy OS X menu icon application for launching commands in Terminal.app and iTerm.
Homepage: http://mbcharbonneau.github.com/terminalicious
Clone URL: git://github.com/mbcharbonneau/terminalicious.git
terminalicious / DSHCustomSelectionColorTextView.m
100755 25 lines (18 sloc) 0.695 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
//
// DSHCustomSelectionColorTextView.m
// Terminalicious
//
// Created by Marc Charbonneau on 7/20/05.
// Copyright 2005 Downtown Software House. All rights reserved.
//
 
#import "DSHCustomSelectionColorTextView.h"
 
@implementation DSHCustomSelectionColorTextView
 
- (void)setSelectedRange:(NSRange)charRange affinity:(NSSelectionAffinity)affinity stillSelecting:(BOOL)flag
{
// Sadly, setSelectedTextAttributes: & delegate methods do not work the way
// I want them to. So, override this instead.
 
[self setTextColor:[NSColor greenColor]];
[self setTextColor:[NSColor blackColor] range:charRange];
 
[super setSelectedRange:charRange affinity:affinity stillSelecting:flag];
}
 
@end