mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-29 20:05:35 +02:00
Patch from Anton Leherbauer for bug 39399, 'goto home' in CEditor.
This commit is contained in:
parent
e6af39c712
commit
d85160f0be
1 changed files with 11 additions and 0 deletions
|
@ -48,6 +48,7 @@ import org.eclipse.swt.widgets.TabItem;
|
|||
import org.eclipse.ui.IWorkbenchPreferencePage;
|
||||
import org.eclipse.ui.PlatformUI;
|
||||
import org.eclipse.ui.dialogs.PreferencesUtil;
|
||||
import org.eclipse.ui.texteditor.AbstractTextEditor;
|
||||
|
||||
/*
|
||||
* The page for setting the editor options.
|
||||
|
@ -126,6 +127,16 @@ public class CEditorPreferencePage extends AbstractPreferencePage implements IWo
|
|||
|
||||
public static void initDefaults(IPreferenceStore store) {
|
||||
|
||||
// bug 84414: enable smart home/end handling
|
||||
// This is a hidden feature of the Eclipse TextEditor:
|
||||
// If enabled, the HOME button positions the cursor to the first
|
||||
// non-whitespace character of the line (ie. the logical start of
|
||||
// the line). Pressing it a second time, positions the cursor to the
|
||||
// first character of the line, ie. to the physical start of the line.
|
||||
// The END button works correspondingly for the end of the line.
|
||||
// JDT also enables this feature.
|
||||
store.setDefault(AbstractTextEditor.PREFERENCE_NAVIGATION_SMART_HOME_END, true);
|
||||
|
||||
store.setDefault(CEditor.MATCHING_BRACKETS, true);
|
||||
PreferenceConverter.setDefault(store, CEditor.MATCHING_BRACKETS_COLOR, new RGB(170,170,170));
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue