32 Commits
Author SHA1 Message Date
Dongbo Wang 0ae04cdc2a Update the inline suggestion rendering to not exceed the max window buffer (#2892) 2021-09-23 14:17:17 -07:00
Maxime Labelle 1966609701 [vi-mode] Undo now leaves the cursor under the position at the start of the deletion (#2045) 2021-09-21 23:04:43 -07:00
Dongbo Wang fd1265e385 Add the prediction ListView and also hook up with the CommandPrediction APIs introduced in PS 7.1 (#1909) 2020-11-03 14:17:37 -08:00
Maxime Labelle cd3ca2911d vi-mode: Make 'dd' deletes the logical line instead of the entire buffer (#1658) 2020-07-24 23:08:05 -07:00
Dongbo Wang 1f28287f72 Make 'ViForwardChar' able to accept suggestions (#1528) 2020-05-18 14:16:20 -07:00
Dongbo Wang ba5294f88a Make edit group more stable in VI mode (#1526) 2020-05-18 13:29:29 -07:00
Maxime Labelle f25a089290 Supporting line wise yanks, including paste and undo. (#811) 2019-11-08 14:42:13 -08:00
Jason Shirk b2c04745e0 Don't add immediate duplicates to history
Also add a public api to access PSReadLine history (helpful in testing
this change.

Fix #562 #533
2017-11-26 17:51:46 -08:00
George Fleming d8b8ed6372 Fix Redo 2017-09-02 22:46:12 -07:00
Jason Shirk 01d1dd23f1 Remove redundant field initializers 2017-07-31 16:53:13 -07:00
Jason Shirk 4aba251bdb Remove unused using directives 2017-07-31 16:44:06 -07:00
Jason Shirk (POWERSHELL) 04c7233b46 Globally suppress 'default args should not be used' 2016-04-27 16:36:50 -07:00
srdubya ab52d2b642 1st attempt at merge with #251. 2015-06-20 16:47:33 -06:00
Jason Shirk (POWERSHELL) 94a6ba40c9 Fix/suppress various FxCop errors 2015-06-18 18:24:23 -07:00
Jason Shirk (POWERSHELL) c986e0eae5 Rename namespace PSConsoleUtilities to Microsoft.PowerShell 2015-06-18 15:32:20 -07:00
Jason Shirk (POWERSHELL) 6408a4c96c Add copyright header 2015-06-18 15:04:49 -07:00
srdubya 6080c5fe13 Merged CJK language support from Jason's upstream (#243). 2015-06-06 05:33:55 -06:00
srdubya 39f37093ec Sync'd with upstream. 2015-03-08 07:58:49 -06:00
jason@truewheels.net 2edaf0ca8b Fix bug with undo after possible completions
repro is something like:

[ArrayL <Ctrl+Space> <Ctrl+Z> <Ctrl+Space> <Ctrl+Z>
2015-01-15 17:22:15 -08:00
srdubya 16f0ad9c5c Sync'd with Upstream. 2014-12-22 18:27:22 -07:00
srdubya 13148f89f4 Fixed Delete and Change so the work for Globs. 2014-12-21 16:20:20 -07:00
jason@truewheels.net a6894489db Add ValidateAndAcceptLine function
To avoid cluttering the screen and history with command lines
that don't work because of stupid errors like "command not found",
you can bind enter to ValidateAndAcceptLine.
2014-09-11 09:13:06 -07:00
Jason Shirk b6a5912122 Fix MenuComplete to not use nested edit groups
I didn't feel like properly solving how to handle nested edit groups when
forgetting edits after an undo, but I forget that MenuComplete was
actually using nested edit groups.

MenuComplete doesn't really need nested edit groups, it was just convenient.
I switched to just remembering the edits to remove and saving a single edit
group for the final selection or removing them all if cancelled.
2014-06-13 13:57:31 -07:00
Jason Shirk fceb3a241a Fix undo bug
There was a bug in undo code where if you undid some stuff, made an edit,
then started a grouped edit, the undo state was incorrect.  A simple
repro was something like (in Windows mode)

    a b c d Ctrl+z Ctrl+z Ctrl+z Shift+LeftArrow Ctrl+x
2014-06-12 19:16:13 -07:00
srdubya a6178b461a Merge remote-tracking branch 'upstream/master'
Conflicts:
	PSReadLine/PSReadLineResources.Designer.cs
	PSReadLine/PSReadLineResources.resx
	PSReadLine/UndoRedo.cs

Signed-off-by: srdubya <stevewy@gmail.com>
2014-05-18 06:57:26 -06:00
jason@truewheels.net 3493d9096f Support menu completion
If completion is ambiguous, we will support interactively selecting
the completion using tabs and/or arrow keys after displaying the
possible completions.

This menu style completion can be cancelled with Ctrl+G or Escape.

Menu completion should be optional as not everybody will like it,
I will add an option and/or a function that makes this something
folks can customize.

Also fixed:
    * Tooltips that contain newlines now look much better
    * Undo groups handled a little better (maybe a non-issue before
      menu completion.)
2014-05-06 11:25:23 -07:00
srdubya 4b0acf08ba Merge remote-tracking branch 'upstream/master'
Conflicts:
	PSReadLine/History.cs
	PSReadLine/Movement.cs
	PSReadLine/PSReadLineResources.resx
	PSReadLine/UndoRedo.cs
2014-04-19 18:06:06 -06:00
jason@truewheels.net 900e3057f2 Cleanup some Resharper issues 2014-04-13 11:21:30 -07:00
srdubya d123804ea0 Added ShowKeyBindings cnt-alt-? key binding.
Fixing missed inadvertant formatting change.
2014-03-29 10:16:02 -06:00
srdubya 50d5f13091 Cleaned up formatting changes in common files.
Further minimized changes to originals.
2014-03-29 07:00:30 -06:00
srdubya 5d649163bc Adding VI edit mode, along with unit tests.
Note, these items need work:
 - No support for Yank/Paste yet.
 - No support for 'G' history goto yet.
 - Undo works, but not as desired in some cases.
2014-03-22 08:16:03 -06:00
jason@truewheels.net 0adc651828 Refactor code to multiple files 2014-01-12 14:11:04 -08:00