From 230e968b4f9cd906a73837043527f2f33b7bda78 Mon Sep 17 00:00:00 2001 From: wlux Date: Tue, 9 Dec 2008 21:47:55 +0000 Subject: [PATCH] Add a provisional implementation of the centerSelectionInVisibleArea: responder method to NSTextView. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27267 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 3 +++ Source/NSTextView_actions.m | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/ChangeLog b/ChangeLog index 12318f6f1..76707b871 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2008-12-09 Wolfgang Lux + * Source/NSTextView_actions.m (-centerSelectionInVisibleArea:): + Provide a provisional implementation. + * Source/NSSavePanel.m (-setAllowedFileTypes:): Change extension of the file name if the current extension is no longer allowed. diff --git a/Source/NSTextView_actions.m b/Source/NSTextView_actions.m index 05096ae16..303e8d34a 100644 --- a/Source/NSTextView_actions.m +++ b/Source/NSTextView_actions.m @@ -1322,6 +1322,14 @@ and layout is left-to-right */ [[self enclosingScrollView] scrollPageUp: sender]; } +- (void) centerSelectionInVisibleArea: (id)sender +{ + /* FIXME: This does not really implement what the method's name suggests, + but it is at least better than nothing. + */ + [self scrollRangeToVisible: [self selectedRange]]; +} + /* -selectAll: inherited from NSText */