Question

If I double-click on a word inside my NSTextField, it selects the entire word, which is good. If I then paste that word elsewhere in the document, it adds a space before it pastes, which is unwanted for the style of application I'm making. How can I turn this off?

Example:

apple->berry->cherry->banana

I double-click on "berry" and copy it to the clipboard. I then place my cursor right after "banana" and type "->", then paste what I copied. Instead of seeing:

apple->berry->cherry->banana->berry

I actually see:

apple->berry->cherry->banana-> berry
Was it helpful?

Solution

Found it!

[textView setSmartInsertDeleteEnabled:NO];

Carry on :)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top