예제 #1
0
        void IWpfTextViewCreationListener.TextViewCreated(IWpfTextView textView)
        {
            // Load the VimRC file if we haven't tried yet
            MaybeLoadVimRc();

            // Create the IVimBuffer after loading the VimRc so that it gets the appropriate
            // settings
            var buffer = _vim.GetOrCreateBuffer(textView);

            Action doCheck = () =>
            {
                // Run the key binding check now
                if (_keyBindingService.ConflictingKeyBindingState == ConflictingKeyBindingState.HasNotChecked)
                {
                    if (Settings.Settings.Default.IgnoredConflictingKeyBinding)
                    {
                        _keyBindingService.IgnoreAnyConflicts();
                    }
                    else
                    {
                        _keyBindingService.RunConflictingKeyBindingStateCheck(buffer, (x, y) => { });
                    }
                }
            };

            Dispatcher.CurrentDispatcher.BeginInvoke(doCheck, null);
        }
예제 #2
0
파일: HostFactory.cs 프로젝트: sh54/VsVim
        void IWpfTextViewCreationListener.TextViewCreated(IWpfTextView textView)
        {
            // Load the VimRC file if we haven't tried yet
            MaybeLoadVimRc();

            // Create the IVimBuffer after loading the VimRc so that it gets the appropriate
            // settings
            var buffer = _vim.GetOrCreateVimBuffer(textView);

            // Save the tab size and expand tab in case we need to reset them later
            var bufferData = new BufferData
            {
                TabStop   = buffer.LocalSettings.TabStop,
                ExpandTab = buffer.LocalSettings.ExpandTab,
                Number    = buffer.LocalSettings.Number
            };

            _bufferMap[buffer] = bufferData;

            Action doCheck = () =>
            {
                // Run the key binding check now
                if (_keyBindingService.ConflictingKeyBindingState == ConflictingKeyBindingState.HasNotChecked)
                {
                    if (Settings.Settings.Default.IgnoredConflictingKeyBinding)
                    {
                        _keyBindingService.IgnoreAnyConflicts();
                    }
                    else
                    {
                        _keyBindingService.RunConflictingKeyBindingStateCheck(buffer, (x, y) => { });
                    }
                }
            };

            _protectedOperations.BeginInvoke(doCheck);
        }
예제 #3
0
 public void IgnoreAnyConflicts1()
 {
     Create();
     _service.IgnoreAnyConflicts();
     Assert.AreEqual(ConflictingKeyBindingState.ConflictsIgnoredOrResolved, _service.ConflictingKeyBindingState);
 }
 private void OnIgnoreClick(object sender, EventArgs e)
 {
     _keyBindingService.IgnoreAnyConflicts();
     _legacySettings.IgnoredConflictingKeyBinding = true;
     _legacySettings.Save();
 }
예제 #5
0
 private void OnIgnoreClick(object sender, EventArgs e)
 {
     _keyBindingService.IgnoreAnyConflicts();
     _vimApplicationSettings.IgnoredConflictingKeyBinding = true;
 }
예제 #6
0
 private void OnNotificationClosed()
 {
     _keyBindingService.IgnoreAnyConflicts();
     _vimApplicationSettings.IgnoredConflictingKeyBinding = true;
 }