Jump to content
Microsoft Windows Bulletin Board

Windows Terminal Preview 1.21 Release


Recommended Posts

Guest Christopher Nguyen
Posted

Windows Terminal is back with another preview release! Windows Terminal Preview 1.21 introduces long-awaited features like Buffer Restore and fontfall back as well as new experimental features like Scratchpad and the ability to load up an image as a texture. There’s also a LOT MORE stuff so check out the rest of this blog post to learn more!

 

We are also updating Windows Terminal stable to version 1.20 which will include all of the features from this previous blog post. You can install Windows Terminal and Windows Terminal Preview from the Microsoft Store, from the GitHub releases page, or by using winget.

 

If you are interested in our bleeding edge features, you can also download Windows Terminal Canary from our GitHub repo.

 

Now let’s learn more about Windows Terminal Preview 1.21!

 

[HEADING=1]Buffer Restore[/HEADING]

 

Windows Terminal can now remember the contents of the screen and restore them on startup. To enable this, you will have to select “Open windows from a previous session” in your Startup settings.

 

Startup.thumb.png.5afbb8a7b096935d230a40433561adfa.png

 

Buffer snapshots are stored in Virtual Terminal-encoded text within your package’s local state directory. This directory is typically secured to your user account. Please be aware of these implications if you plan to enable this feature while using a portable distribution of Windows Terminal.

 

BufferRestore.thumb.gif.d2c8f4eda5aa1cdf2f573addeb405096.gif

 

[HEADING=1]Font Fallback[/HEADING]

 

The font face setting in your profiles’s appearance settings now support multiple fonts and you can use commas to list them out. Glyphs which are not found in your first font will be sought in all later fonts.

 

Below is an example of my PowerShell profile’s font face setting supporting Cascadia Mono NF and MS Gothic:

 

FontFallback-1.png.e841248e2f47113e80bf35084de6bf7f.png

 

[HEADING=1]New Font Settings[/HEADING]

 

Speaking of fonts, we have added new settings to allow you to customize the OpenType Features and Axes of your font stack. We have also added settings to allow you to toggle whether you want to use built-in glyphs or full-color emojis (this one is my personal favorite 1f609.png.82c9b2e79ef8609db522a651aa22d008.png)

 

NewFontSettings.thumb.png.4b0348ce5a87bd4e4dc1ef2a423eff25.png

 

Here is what emojis look like with the full-color emoji setting turned off:

 

No-Color-Emojis.thumb.png.56ffa74717569624a81a0ffd7e7f68ab.png

 

[HEADING=1]New Advanced Settings in the Settings UI[/HEADING]

 

Speaking of settings, we have also added four new settings to the Settings UI in your profiles’s advanced settings. These are settings that enable the right-click context menu, display scrollbar marks (which are now pretty stable!), automatically mark prompts, and allow you to reposition the cursor with mouse clicks (experimental.)

 

NewAdvancedSettings.png.43f7f6e781a7ccec65fb9354475c8222.png

 

In the past, these settings could have only been adjusted via the [iCODE]settings.json[/iCODE] file but now they can also be adjusted in the Settings UI 1f642.png.b982607f163a8e9fb596a17cda9f6215.png

 

[HEADING=1]Rendering Updates[/HEADING]

 

If you look at the Rendering settings of Windows Terminal Preview, you might notice a few changes. Now that AtlasEngine is the default text rendering engine for Windows Terminal, we have removed the old DxEngine from Windows Terminal.

 

We have also added some new settings to let you control the behavior of the AtlasEngine via a setting that allows you to select the Graphics API and a setting to disable partial Swap Chain invalidation.

 

RenderingSettings.thumb.png.c30e466208dc7a1fd516563cb6d60735.png

 

[HEADING=2]Added Support for Custom Box Drawing and Powerline Glyphs[/HEADING]

 

With the AtlasEngine, Windows Terminal can now render pixel-perfect block elements, box-drawing characters, PowerLine symbols, and high-fidelity textured shade glyphs.

 

This is enabled by default but you can turn it off by disabling “Built-in Glyphs” in the Settings UI (or by going to your [iCODE]settings.json[/iCODE] file and setting {profile}.font.builtinGlyphs to [iCODE]false[/iCODE])

 

block_glyphs.thumb.png.3638e6c622eb020a564ddf373e026a24.png

 

[HEADING=2]IME Integration[/HEADING]

 

We have rewritten our Input Method Editor (IME) integration from the ground up. This new rewrite properly blends into TUI applications by adopting their foreground and background colors. We also now use double underlines, wavy lines, and dashed lines to convey more information than ever before in more languages. Oh, and you can finally move the clause cursor during a composition 1f642.png.3c6518f7d85f738f1dc096de4732d810.png

 

The image below is an example of our IME integration in action:

 

ime_composite.thumb.png.2fb9446274c9ef37f3914edf1663aff6.png

 

Here is an example of our IME integration blending into a TUI application like FAR Manager:

 

far_composition.thumb.png.077b0fbbbd1282d5b359915a8948e512.png

 

[HEADING=1]Custom Actions in Fragment Extensions[/HEADING]

 

Our JSON Fragment Extensions now support Custom Actions. Here is an example of a Custom Action that you can call.

 

{
 "schemes": [
   {
     "name": "Dracula",
     "black": "#000000",
     "red": "#ff5555",
     "green": "#50fa7b",
     "yellow": "#f1fa8c",
     "blue": "#bd93f9",
     "purple": "#ff79c6",
     "cyan": "#8be9fd",
     "white": "#bbbbbb",
     "brightBlack": "#555555",
     "brightRed": "#ff5555",
     "brightGreen": "#50fa7b",
     "brightYellow": "#f1fa8c",
     "brightBlue": "#bd93f9",
     "brightPurple": "#ff79c6",
     "brightCyan": "#8be9fd",
     "brightWhite": "#ffffff",
     "background": "#1e1f29",
     "foreground": "#f8f8f2",
     "selectionBackground": "#44475a",
     "cursorColor": "#bbbbbb"
   }
 ],
 "actions": [
   {
     "command": {
       "action": "setColorScheme",
       "colorScheme": "Dracula"
     },
     "name": "Phone up Bram Stoker",
     "id": "Dracula.Draculize"
   }
 ]
}

 

If you place the snippet as a [iCODE].json[/iCODE] file inside a [iCODE]Fragments[/iCODE] folder in [iCODE]%LOCALAPPDATA%\Microsoft\Windows Terminal[/iCODE], then you’ll be able to call a custom action called “Phone Up Bram Stoker” that sets your Color Scheme to the Dracula color scheme.

 

Shoutout to @DHowett for this example and draculatheme.com for the colorful theme 1f9db.png.43eea1d337fcbb2b78c684e2a646af56.png

 

Custom-Action-in-Fragment-Extensions.gif.c8012fecb1731ee957b5d039bf27d49e.gif

 

[HEADING=1]Scratchpad (Experimental)[/HEADING]

 

We have refactored terminal panes to be able to host non-Terminal content. One application of this refactor is our new, experimental Scratchpad feature. This feature open up a textbox in a separate terminal pane. To enable Scratchpad, add the following as an [iCODE]action[/iCODE] in your [iCODE]settings.json[/iCODE] file:

 

{"action":"splitPane","type":"scratchpad"}

 

After that Action is saved, you can invoke it in your Command Palette (as with every Action you make.) You can also assign a keybinding to that action as well if you do not want to open the Command Palette every time you want to use this Action.

 

Scratchpad.thumb.gif.81bdaa6faf3338b5f4331734facaa190.gif

 

[HEADING=1]experimental.pixelShaderImagePath Setting[/HEADING]

 

Users can now load up an image as a texture by using the [iCODE]experimental.pixelShaderImagePath[/iCODE] setting. Huge shoutout to @mrange for this contribution and example!

 

In @mrange‘s example below, you can see that the [iCODE]pixelShaderImagePath[/iCODE] points to a PNG loaded as a texture which the shader pointed out by [iCODE]pixelShaderPath[/iCODE] uses.

 

"defaults": 
{ 
    "experimental.pixelShaderImagePath": "C:\temp\cake.png", 
    "experimental.pixelShaderPath": "C:\code\github\windows-terminal-shaders\cake.hlsl" 
},

 

@mrange‘s final result looks like this:

 

mrangeExampleOfPixelShaders.thumb.png.874e1b26d4c1cae25d63db7908aedb55.png

 

[HEADING=1]Usability Updates[/HEADING]

 

26a1.png.ce0656a6d16b7a63090ca3b6fae9a680.png Terminal distributions now come with an additional library, [iCODE]Microsoft.Terminal.UI.dll[/iCODE]. Its [iCODE].winmd[/iCODE] is not required.

 

26a1.png.28ae3eb03004e47113b8cbd030996807.png Marks are no longer an experimental feature! They also now reflow on resize and clear properly!

 

26a1.png.3ad2ae4399370cd7ab3e9b244c410b03.png The Pane keybindings Alt+Shift++ and Alt+Shift+- will now duplicate your active profile.

 

26a1.png.40b043725b29ed2f26bf52775a803a91.png Terminal will now delete its in-box color schemes from your local settings file, unless you’ve modified them.

 

26a1.png.a3699b39b34eb90a74d15833fe1f18a6.png You can no longer edit the color schemes that come with Terminal without copying them.

 

26a1.png.c74b0bfc2df11212e0a2f2ef78d1acfe.png We’ve added new color schemes: Dark+, CGA and IBM!

 

26a1.png.2e982d61f7bbbad183e3930efc681940.png Profiles now default to the icons of their [iCODE].exe[/iCODE] files, if those can be determined. If you want your profile to have no icon, you must set the icon to [iCODE]"none"[/iCODE] (or check the “Hide icon” in Settings)

 

26a1.png.f1ee7c6bb6d5a3b384e344872abde7a5.png The Search box now animates in and out (thanks @tusharsnx!)

 

26a1.png.5619f5c1bd761c76885897a73ff7f429.png We’ve restyled the Warning and Error displays around the font settings so that they’re more readable.

 

26a1.png.814f267ecb7d21cc65debcb7b0ab7ebb.png We’ve started laying the groundwork for action binding so please be on the lookout for any strangeness!

 

[HEADING=1]Bug Fixes[/HEADING]

 

1f41b.png.a4c81c13aaa4349a1747a166824dc998.png Double-clicking a word on the left side of the screen will no longer select parts of your right prompt.

 

1f41b.png.a80ed8309fa7f52bb5756260ce2cd3b4.png URLs that touch the right side of the screen or get resized are once again clickable

 

1f41b.png.cceb5dd6c3e77d04c38206278361ea66.png Double-clicking a word in a double-width or double-height row now actually selects the right word (thanks again @tusharsnx!)

 

1f41b.png.326257ea7a32040fd2fa6142ad72212a.png During RTF export, we will now use a background color directive that Microsoft Word understands (#16035) (thanks yet again @tusharsnx!)

 

1f41b.png.7adb0838114b63744f92cd95225a275b.png Our light color schemes no longer have a truly unusable selection highlight color (thanks @uoRetr0!)

 

1f41b.png.74d179c92924af77bee608d9a45e2690.png We’ve fixed an issue where hyperlinks are detected in the wrong place if there’s a wide character (thanks @comzyh!)

 

1f41b.png.79937a42a224f65a438dda6bc2e1a691.png You can no longer use the Settings UI to enter an initial size that is out of bounds (thanks @chingucoding!)

 

1f41b.png.4396eca709a231360f39df719f19d4c1.png The experimental [iCODE]repositionCursorWithMouse[/iCODE] setting now actually works after you’ve scrolled the screen.

 

1f41b.png.75c56addfd4ef6093f3197d449c78c38.png [iCODE]doskey[/iCODE] macros finally works on inputs with more than one consecutive space character.

 

1f41b.png.dbaebc19311105551f84ae45da645779.png AtlasEngine will no longer occasionally crash when rendering characters in the Unicode Private Use Area.

 

[HEADING=1]Virtual Terminal Compatibility Improvements[/HEADING]

 

Huge thanks to @j4james for his help in the Virtual Terminal space!

 

1f5a5.png.b170417485185f3f5ffbcda7b7c24822.png You can now set the window (tab, pane) title with [iCODE]DECSWT[/iCODE] (Set Window Title) in addition to XTerm’s OSC 2

 

1f5a5.png.f32d80a25444088f86d7dad883545cc6.png We now support [iCODE]DECAUPSS[/iCODE], [iCODE]DECRQUPSS[/iCODE] and [iCODE]ACS[/iCODE], which completes the 8-bit interface architecture.

 

1f5a5.png.46f3d8521837bf4f635b06cada812f34.png DCS sequences that span packets will no longer get sliced in half and–in so being–destroyed.

 

[HEADING=1]Performance Improvements[/HEADING]

 

1f525.png.eacf8258c08b6c50a3a587cb6a9cfadd.png Search highlighting was rewritten to be more robust, responsive, and performant (thanks again @tusharsnx!)

 

1f525.png.33ae1c36c1cc6aa23e42c2a7b48d1899.png The console hosting backend no longer spuriously repaints single characters (thanks yet again @j4james!)

 

1f525.png.c3d86aed1d40716127589c7620d5c264.png Moving the cursor around was surprisingly expensive so we reduced the cost of cursor invalidation!

 

Windows Terminal 1.21 Preview is packed with lots of updates. For a full list of changes and which versions of Windows Terminal those changes were backported to, please visit our a> page on the Windows Terminal GitHub repository for more information.

 

[HEADING=1]Top contributors[/HEADING]

 

We love working with the community and recognizing those who made an impact for each release. Here are the community members who helped out for this one!

 

[HEADING=2]Contributors who created the most merged pull requests[/HEADING]

 

1f3c6.png.044fcf66e61f6fa6a67b7154e026c246.png Jvr2022

 

1f3c6.png.496101740262233dc988e459edc7670b.png tusharsnx

 

1f3c6.png.bc5be8d6e0c2a57b69b3a4ec183b7ef4.png j4james

 

[HEADING=2]Contributors who opened the most non-duplicate issues[/HEADING]

 

1f3c6.png.0bb7495b216c3911516c8743f1c2c900.png j4james

 

1f3c6.png.ee9ba232ab7209edad826071385f409e.png Zeroes1

 

1f3c6.png.19973c298329a5fb29103dc218d6e2ec.png PhMajerus

 

[HEADING=2]Contributors who provided the most comments on pull requests[/HEADING]

 

1f3c6.png.f16915e731cab647e102e090b3d3f778.png tusharsnx

 

1f3c6.png.e714f534954ea2435b1c560e460bc535.png j4james

 

1f3c6.png.ca0c4ca3bd6b38428f58f120f062728d.png FuegoFro

 

We would also like to give a special thanks to @hellocharli, @Blake-Madden, @wcruz-br, and @berlintay, for code quality, documentation, repository management, and dependency updates across the board!

 

[HEADING=1]Thank you![/HEADING]

 

We hope you enjoy this release of Windows Terminal 1.21 Preview! More information on these new features can be found on our docs site and if you find any bugs or have feature requests, feel free to file them on GitHub.

 

If you have any questions you can reach out to Christopher Nguyen (@nguyen_dows) on X (formerly Twitter.)

 

Thanks again!

 

Jan2023Signatures.thumb.png.9e48b047c327fcfa638ca9dab76f2a3d.png

 

The post Windows Terminal Preview 1.21 Release appeared first on Windows Command Line.

 

Continue reading...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...