From ca162211f5e2f3d7312f87d77b2d7a50465dc20e Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Wed, 31 Aug 2011 11:47:02 +0000 Subject: Use API to find out if a browser window has a selection. svn path=/trunk/netsurf/; revision=12683 --- cocoa/BrowserViewController.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cocoa') diff --git a/cocoa/BrowserViewController.m b/cocoa/BrowserViewController.m index 2ae354d71..a1b18605c 100644 --- a/cocoa/BrowserViewController.m +++ b/cocoa/BrowserViewController.m @@ -202,11 +202,11 @@ static inline bool compare_float( float a, float b ) SEL action = [item action]; if (action == @selector(copy:)) { - return selection_defined( browser->sel ); + return browser_window_has_selection( browser ); } if (action == @selector(cut:)) { - return selection_defined( browser->sel ) && browser->caret_callback != NULL; + return browser_window_has_selection( browser ) && browser->caret_callback != NULL; } if (action == @selector(paste:)) { -- cgit v1.2.3