Commit graph

733 commits

Author SHA1 Message Date
Anirudh Rayabharam 13406b746b Copy RTF data to the clipboard (#3535)
## Summary of the Pull Request
RTF data is now copied to the clipboard. Tested by copy pasting text from terminal to WordPad.

<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist
* [x] Closes #2487
* [x] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA
* [ ] Tests added/passed
* [ ] Requires documentation to be updated
* [x] I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #2487

<!-- Provide a more detailed description of the PR, other things fixed or any additional comments/features here -->
## Detailed Description of the Pull Request / Additional comments
Mostly similar to PR #1224. Added a new static method `GenRTF` in `TextBuffer` that is responsible
for generating the RTF representation of a given text. The generated RTF is added to the `DataPackage` that is ultimately passed to the clipboard.

<!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well -->
## Validation Steps Performed
Validated by copy pasting text from the terminal to WordPad. Validated with different colors to make sure that is working. (MS Word seems to prefer HTML data from the clipboard instead of RTF.)

<hr>

* Copy RTF data to the clipboard

* Added comment explaining various parts of the header

* Fixed static code analysis issues and added noexcept to GenRTF()

* Removed noexcept
2019-11-13 14:13:22 -06:00
Leon Liang a404778271 Add Selection Background Color as a setting to Profiles and Col… (#3471)
<!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? -->
## Summary of the Pull Request
This introduces a setting to both Profiles and ColorSchemes called <code>selectionBackground</code> that allows you to change the selection background color to what's specified. If <code>selectionBackground</code> isn't set in either the profile or color scheme, it'll default to what it was before - white.

<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist
* [x] Closes #3326
* [x] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA
* [x] Tests added/passed
* [x] Requires documentation to be updated

<!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well -->
## Validation Steps Performed
- Added selectionBackground to existing profile and colorscheme tests.
- Verified that the color does change to what I expect it to be when I add "selectionBackground" to either/both a profile and a color scheme.


<hr>

* adding selectionBackground to ColorScheme and TerminalSettings

* Changing PaintSelection inside the renderers to take a SelectionBackground COLORREF

* changes to conhost and terminal renderdata, and to terminal settings and core

* IT WORKS

* modification of unit tests, json schemas, reordering of functions

* more movement

* changed a couple of unit tests to add selectionBackground, added the setting to schemas, also added the optional setting to profiles

* default selection background should be slightly offwhite like the default foreground is

* reverting changes to .sln

* cleaning up

* adding comment

* oops

* added clangformat to my vs hehe

* moving selectionBackground to IControlSettings and removing from ICoreSettings

* trying to figure out why the WHOLE FILE LOOKS LIKE ITS CHANGED

* here it goes again

* pls

* adding default foreground as the default for selection background in dx
2019-11-13 12:17:39 -06:00
Leonard Hecker c9f148c4b6 Fixed #3101: Alt+Arrow-Keys print extra characters (#3117)
## Summary of the Pull Request

This PR potentially fixes #3101.

## PR Checklist
* [x] Closes #3101.
* [x] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA
* [ ] Tests added/passed
* [ ] Requires documentation to be updated
* [ ] I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx

## Detailed Description of the Pull Request / Additional comments

This PR fixes #3101 by setting flag 0 in `ToUnicodeEx()` even though the documentation says "If bit 0 is set, a menu is active.". I'm not 100% sure why it works, but it definitely does in this case.
I thought that bit 2, which claims that "keyboard state is not changed" would be sufficient to prevent this from happening, but it seems that's not the case.

I believe this PR should be verified by a developer at Microsoft who's familiar with the internal workings of `ToUnicodeEx()`.
We need this function (or something similar) to translate Alt+Key combinations to proper unicode.
But at the same time it should not send us any additional IBM-style Alt Codes to our character handler if that translation fails (and `ToUnicodeEx()` returns 0).

## Validation Steps Performed

See #3101 for more information. I ensured that Alt+Arrow-Key combinations do not print ◘☻♠♦ anymore.
2019-11-13 10:59:28 -06:00
Chester Liu 1177815f81 Throttle scroll position update (#3531)
<!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? -->
## Summary of the Pull Request

Another tiny performance fix.

<!-- Provide a more detailed description of the PR, other things fixed or any additional comments/features here -->
## Detailed Description of the Pull Request / Additional comments

Correct me if I'm wrong, It doesn't really make sense to update scroll status faster than frame rate limit.

<!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well -->
## Validation Steps Performed

<hr>

* Throttle scroll position update

* Review
2019-11-13 07:23:31 -06:00
Mike Griese 306e751639 Fixes #3518 (#3521) 2019-11-13 02:12:43 +00:00
Dustin L. Howett (MSFT) fe4c80b27d
Expand environment variables in ConptyConnection (#3549)
Fixes #3548.
2019-11-12 16:47:57 -08:00
Kayla Cinnamon d2ca3c1fb0 Increase left padding around tabs (#3513)
Closes #3370.
2019-11-12 11:19:37 -08:00
Kayla Cinnamon 9a84521965 doc: allow null for foreground/background in schema (#3527)
Closes #2963.
2019-11-12 11:18:22 -08:00
shakeel30 e2994ff890 Move Contributing.md file to root (#3514)
moved contributing.md from doc\ to root
2019-11-11 19:02:33 -05:00
Dustin L. Howett (MSFT) 7068b3124d Don't ever try to pass "" as a starting directory, no way (#3506)
Fixes #3504.
2019-11-11 18:44:49 +00:00
Huo Yaoyuan db79758092 wpf: Add .NET Core target to WPF control (#3470) 2019-11-08 14:21:17 -08:00
Dustin L. Howett (MSFT) 58b52ef69e
replace vcpkg-cpprestsdk with a +ARM64 -ssl/boost +UWP version (#3489)
This new cpprestsdk package, 2.10.14, switches us to the app CRT.
cpprestsdk turns fof a bunch of boost and openssl dependencies when it's
built for the Windows Store subplatform, so we got a bunch of stuff for
free.

Incidentally, I fixed #2338 the real/correct way -- the build rules in
the package now make sure they're not using the system vcpkg root.
2019-11-08 14:17:11 -08:00
Chester Liu c274b38dcc dx: don't check the OS version multiple times (#3480) 2019-11-08 14:14:46 -08:00
Michael Niksa ddcc06e911
Move project to app CRTs in preparation to run Universal (#3474)
* Change to use App CRT in preparation for universal.
* Try to make project build again by setting winconpty to static lib so it'll use the CRT inside TerminalConnection (or its other consumers) instead of linking its own.
* Remove test for conpty dll, it's a lib now. Add additional commentary on how CRT linking works for future reference. I'm sure this will come up again.
* use the _apiset variant until proven otherwise to match the existing one.
* Clarification in the comments for linking.
2019-11-08 14:09:39 -08:00
Michael Niksa 4dd476ecbd
Revert locking changes (#3488)
This reverts commit 56c35945b9.

Also patches up some build fixes made after it and corrects a VtRendererTest that was dependent on the locks.
2019-11-08 13:44:52 -08:00
James Clarke bd1604a0b5 Add support for tab drag and drop (#3478)
* Add support for tag drag and drop

Co-authored-by: James Clarke (WDG) <jeclarke@ntdev.microsoft.com>
2019-11-08 09:27:20 -08:00
Michael Niksa 3e8a1a78bc Break everything out of App except Xaml platform init (#3465)
This commit breaks everything out of App except the base initialization for XAML.
AppLogic is the new home for all terminal-specific singleton magic.
2019-11-07 13:10:58 -08:00
Dustin L. Howett (MSFT) d26865f460
Move AzureConnection's strings into localizable resources (#3463)
This also sets up TerminalConnection to _have_ resources, which will be useful for the messages in #3461.
2019-11-07 12:26:45 -08:00
Dustin L. Howett (MSFT) 357e835f5d
Replace ConhostConnection with ConptyConnection (#3461)
This commit deletes ConhostConnection and replaces it with
ConptyConnection. The ConptyConnection uses CreatePseudoConsole and
depends on winconpty to override the one from kernel32.

* winconpty must be packageable, so I've added GetPackagingOutputs.
   * To validate this, I added conpty.dll to the MSIX regression script.
* I moved the code from conpty-universal that deals with environment
  strings into the types library.

This puts us in a way better place to implement #2563, as we can now
separately detect a failure to launch a pseudoconsole, a failure to
CreateProcess, and an unexpected termination of the launched process.

Fixes #1131.
2019-11-06 15:09:01 -08:00
Mike Griese d2dcdef620
Create a doc for adding common third-party tools (#3353)
* Create a doc for adding common third-party tools

Maybe it would be helpful to have a comprehensive guide on adding some common third-party tools as profiles.

* add some additional tools from PR
2019-11-06 15:14:43 -06:00
Mike Griese f0c110593a Add a note on using WSL paths to user docs (#3405)
* Add a note on using WSL paths to documentation

Co-Authored-By: greg904 <56923875+greg904@users.noreply.github.com>
Co-Authored-By: Carlos Zamora <carlos.zamora@microsoft.com>
2019-11-06 11:19:43 -08:00
Mike Griese 3df292430f Prevents DWM crashing from also crashing us (#3460)
It's apparently perfectly possible that DWM will just crash or close, and when
  it does, `DwmExtendFrameIntoClientArea` will return a failure. If we
  THROW_IF_FAILED that call, then we'll also crash when DWM does.

  This converts that THROW_IF_FAILED to a LOG_IF_FAILED. When DWM comes back,
  we'll hit this codepath again, and all will be right again in the world.
2019-11-06 10:56:54 -08:00
d-bingham fee3fdf322 Replacing \r\n line endings with \r line endings (#3449)
<!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? -->
## Summary of the Pull Request

<!-- Other than the issue solved, is this relevant to any other issues/existing PRs? --> 
## References

#1091 
#1094 
#2390 
#3314

<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist
* [x] Closes #1091
* [x] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA
* [ ] Tests added/passed
* [ ] Requires documentation to be updated
* [x] I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx

<!-- Provide a more detailed description of the PR, other things fixed or any additional comments/features here -->
## Detailed Description of the Pull Request / Additional comments

Combination of the PRs #1094, #2390, and #3314, especially as discussed in #3314.

In short, this changes line endings from Windows-space \r\n to the more universal \r.

<!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well -->
## Validation Steps Performed

Copied and pasted text into the terminal without the patch, line endings were doubled.
With the patch, line endings weren't doubled.


--------------------

* Replacing \r\n line endings with \r line endings

* Fixing Formatting
2019-11-06 08:02:55 -06:00
Dustin L. Howett (MSFT) 9dc922fc37
Unify and clean up the common build properties (#3429)
This commit cleans up and deduplicates all of the common build
preamble/postamble across exe, dll, lib and c++/winrt projects.

The following specific changes have been made:
* All projects now define their ConfigurationType
* All projects now set all their properties *before* including a common
  build file (or any other build files)
* cppwinrt.pre and cppwinrt.post now delegate most of their
  configuration to common.pre and common.post
* (becuase of the above,) all build options are conserved between
  console and c++/winrt components, including specific warnings and
  preprocessor definitions.
* More properties that are configurable per-project are now
  conditioned so the common props don't override them.
* The exe, dll, exe.or.dll, and lib postincludes have been merged into
  pre or post and switched based on condition as required
* Shared items (-shared, -common) are now explicitly vcxitems instead of
  vcxproj files.
* The link line is now manipulated after Microsoft.Cpp sets it, so the
  libraries we specify "win". All console things link first against
  onecore_apiset.lib.
* Fix all compilation errors caused by build unification
* Move CascadiaPackage's resources into a separate item file

Fixes #922.
2019-11-05 14:29:11 -08:00
Michael Niksa 52d7de38b1
Prevent cleanup of object given to handle that failed access check (#3414)
* Ensure rights check and increments pass before assigning an object to a handle (since deallocation of handles will automatically attempt to cleanup).
2019-11-05 14:22:55 -08:00
James Holderness 53b6f143b3 Improve the DECSC/DECRC implementation (#3160)
The current DECSC implementation only saves the cursor position and
origin mode. This PR improves that functionality with additional support
for saving the SGR attributes, as well as the active character set.

It also fixes the way the saved state interacts with the alt buffer
(private mode 1049), triggering a save when switching to the alt buffer,
and a restore when switching back, and tracking the alt buffer state
independently from the main state.

In order to properly save and restore the SGR attributes, we first
needed to add a pair of APIs in the `ConGetSet` interface which could
round-trip the attributes with full 32-bit colors (the existing methods
only work with legacy attributes).

I then added a struct in the `AdaptDispatch` implementation to make it
easier to manage all of the parameters that needed to be saved. This
includes the cursor position and origin mode that we were already
tracking, and now also the SGR text attributes and the active character
set (via the `TermOutput` class).

Two instances of this structure are required, since changes made to the
saved state in the alt buffer need to be tracked separately from changes
in the main buffer. I've added a boolean property that specifies whether
we're in the alt buffer or not, and use that to decide which of the two
instances we're working with.

I also needed to explicitly trigger a save when switching to the alt
buffer, and a restore when switching back, since we weren't already
doing that (the existing implementation gave the impression that the
state was saved, because each buffer has its own cursor position, but
that doesn't properly match the XTerm behaviour).

For the state tracking itself, we've now got two additional properties -
the SGR attributes, which we obtain via the new private API, and the
active character set, which we get from a local `AdaptDispatch` field.
I'm saving the whole `TermOutput` class for the character set, since I'm
hoping that will make it automatically supports future enhancements. 

When restoring the cursor position, there is also now a fix to handle
the relative origin mode correctly. If the margins are changed between
the position being saved and restored, it's possible for the cursor to
end up outside of the new margins, which would be illegal. So there is
now an additional step that clamps the Y coordinate within the margin
boundaries if the origin mode is relative.

# Validation

I've added a couple of screen buffer tests which check that the various
parameters are saved and restored as expected, as well as checking that
the Y coordinate is clamped appropriately when the relative origin mode
is set.

I've also tested manually with vttest and confirmed that the
_SAVE/RESTORE CURSOR_ test (the last page of the _Test of screen
features_)) is now working a lot better than it used to.

Closes #148.
2019-11-05 13:35:50 -08:00
Mike Griese 388b975663
Enable fullscreen mode (#3408)
## Summary of the Pull Request

Enables the `toggleFullscreen` action to be able to enter fullscreen mode, bound by default to <kbd>alt+enter</kbd>.

The action is bubbled up to the WindowsTerminal (Win32) layer, where the window resizes itself to take the entire size of the monitor.

This largely reuses code from conhost. Conhost already had a fullscreen mode, so I figured I might as well re-use that.

## References

Unfortunately there are still very thin borders around the window when the NonClientIslandWindow is fullscreened. I think I know where the problem is. However, that area of code is about to get a massive overhaul with #3064, so I didn't want to necessarily make it worse right now.  

A follow up should be filed to add support for "Always show / reveal / never show tabs in fullscreen mode". Currently, the only mode is "never show tabs".

Additionally, some of this code (particularily re:drawing the nonclient area) could be re-used for #2238.

## PR Checklist
* [x] Closes #531, #3411
* [x] I work here
* [n/a] Tests added/passed 😭
* [x] Requires documentation to be updated


## Validation Steps Performed
* Manually tested both the NonClientIslandWindow and the IslandWindow.

* Cherry-pick commit 8e56bfe

* Don't draw the tab strip when maximized

(cherry picked from commit bac4be7c0f3ed1cdcd4f9ae8980fc98103538613)

* Fix the vista window flash for the NCIW

(cherry picked from commit 7d3a18a893c02bd2ed75026f2aac52e20321a1cf)

* Some code cleanup for review

(cherry picked from commit 9e22b7730bba426adcbfd9e7025f192dbf8efb32)

* A tad bit more notes and cleanup

* Update schema, docs

* Most of the PR comments

* I'm not sure this actually works, so I'm committing it to revert it and check

* Update some comments that were lost.

* Fix a build break?

* oh no
2019-11-05 13:40:29 -06:00
Mike Griese 94213ad94c Fix a problem with bcz.cmd (#3436)
Closes #3400.
2019-11-04 16:35:52 -08:00
greg904 5dfc021d8e Use standard 1px window borders on NC Island Window (#3394)
We take the standard window frame except that we remove the top part
(see `NonClientIslandWindow::_OnNcCalcSize`), then we put little 1 pixel
wide top border back in the client area using
`DwmExtendFrameIntoClientArea` and then we put the XAML island and the
drag bar on top.

Most of this PR is comments to explain how the code works and also
removing complex code that was needed to handle the weird cases when the
borders were custom.

I've also refactored a little bit the `NonClientIslandWindow` class.

* Fix DwmExtendFrameIntoClientArea values
* Fix WM_NCHITTEST handling
* Position the XAML island window correctly
* Fix weird colors in drag bar and hide old title bar buttons
* Fix the window's position when maximized
* Add support for dark theme on the frame
* DRY shared code between conhost and new terminal
* Fix drag bar and remove dead code
* Remove dead code and use cached DPI
* Refactor code
* Remove impossible TODO
* Use system metrics instead of hardcoding resize border height
* Use theme from app settings instead of system theme. Improve comments. Remove unused DWM frame on maximize.
* Fix initial position DPI handling bug and apply review changes
* Fix thick borders with DPI > 96

Closes #3064.
Closes #1307.
Closes #3136.
Closes #1897.
Closes #3222.
Closes #1859.
2019-11-04 15:45:40 -08:00
Zoey Riordan 6f36f8b23f wpf: make the cursor blink (#3415) 2019-11-04 13:41:02 -08:00
Chester Liu a4c24f82e6 Break if an early exit can not be found in InsertAttrRuns (#3262) 2019-11-04 09:42:30 -08:00
Chester Liu de9231a88b Replace macros with constexpr part 2 (#3416) 2019-11-04 07:37:47 -06:00
Dustin L. Howett (MSFT) 15505337d8
Introduce a WinRT utils library and "checked resources" (#3350)
This commit introduces a C++/WinRT utility library and moves
ScopedResourceLoader into it. I decided to get uppity and introduce
something I like to call "checked resources." The idea is that every
resource reference from a library is knowable at compile time, and we
should be able to statically ensure that all resources exist.

This is a system that lets us immediately failfast (on launch) when a
library makes a static reference to a resource that doesn't exist at
runtime.

It exposes two new (preprocessor) APIs:
* `RS_(wchar_t)`: loads a localizable string resource by name.
* `USES_RESOURCE(wchar_t)`: marks a resource key as used, but is intended
  for loading images or passing static resource keys as parameters to
  functions that will look them up later.

Resource checking relies on diligent use of `USES_RESOURCE()` and `RS_()`
(which uses `USES_RESOURCE`), but can make sure we don't ship something
that'll blow up at runtime.

It works like this:

**IN DEBUG MODE**
- All resource names referenced through `USES_RESOURCE()` are emitted
  alongside their referencing filenames and line numbers into a static
  section of the binary.
  That section is named `.util$res$m`.

- We emit two sentinel values into two different sections, `.util$res$a`
  and `.util$res$z`.

- The linker sorts all sections alphabetically before crushing them
  together into the final binary.

- When we first construct a library's scoped resource loader, we
  iterate over every resource reference between `$a` and `$z` and check
  residency.

**IN RELEASE MODE**
- All checked resource code is compiled out.

Fixes #2146.

Macros are the only way to do something this cool, incidentally.

## Validation Steps Performed
Made references to a bunch of bad resources, tried to break it a lot.

It looks like this when it fails:

### App.cpp
```
36  static const std::array<std::wstring_view, 2> settingsLoadErrorsLabels {
37      USES_RESOURCE(L"NoProfilesText"),
38      USES_RESOURCE(L"AllProfilesHiddenText_HA_JUST_KIDDING")
39  };
```

```
WinRTUtils\LibraryResources.cpp(68)\TerminalApp.dll:
    FailFast(1) tid(1034) 8000FFFF Catastrophic failure
    Msg:[Resource AllProfilesHiddenText_HA_JUST_KIDDING not found in
      scope TerminalApp/Resources (App.cpp:38)] [EnsureAllResourcesArePresent]
```
2019-11-01 15:47:05 -07:00
Dustin L. Howett (MSFT) a34c47a493
Fix our parallel (and repeating) builds (#3412)
The WAP packaging project in VS <= 16.3.7 produces a couple global
properties as part of its normal operation that cause MSBuild to flag
our projects as out-of-date and requiring a rebuild. By forcing those
properties to match the WAP values, we can get consistent builds.

One of those properties, however, is "GenerateAppxPackageOnBuild", and
WAP sets it to *false*. When we set that, of course, we don't get an
MSIX out of our build pipeline. Therefore, we have to break our build
into two phases -- build, then package.

This required us to change our approach to PCH deletion. A project
without a PCH is *also* considered out-of-date. Now, we keep all PCH
files but truncate them to 0 bytes.

TerminalApp, however, is re-linked during packaging because the Xaml
compiler emits a new generated C++ file on every build. We have to keep
those PCHs around.

* Remove WpfTerminalControl AnyCPU from Arch-specific builds

This removes another source of build nondeterminism: that WpfTerminalControl was propagating TargetFramework into architecture-specific C++ builds. Its "Any CPU" platform has been removed from architecture builds at the solution level.

This also cleans up some new projects that were added and build for "Any
CPU".
2019-11-01 14:38:13 -07:00
Mike Griese 64943bd033
Indicate which pane is focused with the Accent color on the pan… (#3060)
## Summary of the Pull Request

Adds a small border with the accent color to indicate a pane is focused

<img src="https://user-images.githubusercontent.com/18356694/66218711-560e4b80-e68f-11e9-85b0-1f387d35bb92.png" width="480">
<img src="https://user-images.githubusercontent.com/18356694/66218757-6f16fc80-e68f-11e9-8d39-db9ab748c4de.png" width="480">
<img src="https://user-images.githubusercontent.com/18356694/66219194-55c28000-e690-11e9-9835-8b5212e70e8a.png" width="480">

## PR Checklist
* [x] Closes #994
* [x] I work here
* [😢] Tests added/passed
* [n/a] Requires documentation to be updated

## Detailed Description of the Pull Request / Additional comments

I've removed the simple Grid we were using as the pane separator, and replaced it with a Border that might appear on any side of a pane.

When we add a split, we'll create each child with one of the `Border` flags set (each child with one of a pair of flags). E.g. creating a horizontal split creates one child with the `Top` border, and another with the `Bottom`. 

Then, if one of those panes is split, it will pass it's border flag to is new children, with the additional flag set. So adding another Vertical split to the above scenario would create a set of panes with either (`Top|Left`, `Top|Right`) or (`Bottom|Left`, `Bottom|Right`) borders set, depending on which pane was split.

<hr>

* start work on this by tracking border state

* Colorize the border

* Use the accent color for highlighting

* Cleanup the accent color code

* Don't buy any rural real estate when closing a pane

* Closing panes works well now too

* Cleanup for review

* Update src/cascadia/TerminalApp/Pane.cpp

* try some things that don't work to fix the resizing crash

* Revert "try some things that don't work to fix the resizing crash"

This reverts commit 3fc14da113.

* this _does_ work, but I think it's not semantically correct

* This doesn't seem to work either.

  I tried adding the pane seperators to the Pane::_GetMinWidth calculation. That
  works for prevent the crash, but the resizing is wonky now. If you add a
  Vertical split, then a second, then resize the middle pane really small,
  you'll see that the _last_ resize doesn't work properly. The text seems to
  overhand into the border.

  Additionally, there's really weird behavior resizing panes to be small. They
  don't always seem to be resizable to the smallest size.

* Revert "This doesn't seem to work either."

This reverts commit 2fd8323e7b.

* Merge the changes from the "this is the one" branch

  Again, no idea what I really did that worked, but it does

* Cleanup from my mess of a commit

  This makes so much more sense now

* Other PR feedback from @carlos-zamora

* Fix a typo
2019-11-01 15:06:11 -05:00
Chester Liu 86e0ea73e2 Replace some macros with constexpr (#3362) 2019-11-01 10:33:09 -07:00
mcpiroman 8c8672c87a Fix scrollbar update after terminal close (#3256) 2019-11-01 09:40:29 -07:00
Zoey Riordan 26decf13d0 wpf: Change scrollbar buttons to one line per click (#3397)
Fix scrolling in the WPF control so that clicking the arrow buttons scrolls one line at a time.
2019-10-31 17:17:14 -07:00
Michael Niksa 126d489af9
Compensate for non-minimal UTF-8 encodings (#3380)
* Allow Mb2Wc to substitute U+FFFD (unicode replacement) for non-minimal forms of characters that get past our initial invalid-sequence screening.
2019-10-31 10:50:34 -07:00
Rahul Thakare 581d63fa8d Added <kbd> notations for keyboard keys. (#2975)
* Added <kbd> notations for keyboard keys.
2019-10-31 09:53:38 -07:00
James Holderness c0399b2c2e Get rid of the SCREEN_INFORMATION::LineChar array (#3371) 2019-10-31 10:12:41 -05:00
James Holderness 46ac1918ec Add support for the HPA escape sequence (#3368)
* Add support for the HPA escape sequence as an alias for CHA.

* Extend the output engine tests for cursor movement to confirm that HPA is dispatched in the same way as CHA.
2019-10-31 10:12:32 -05:00
Anirudh Rayabharam 891b34de07 CascadiaSettings: Use map to find matching color scheme (#3288)
The _FindMatchingColorScheme currently iterates through all pairs in the
map to find the matching color scheme for a given JSON.

Improved this by using the name from the JSON to lookup the color scheme
in the map.
2019-10-31 10:11:54 -05:00
Gabriel Dugny c879cd3f97 Added link to Changelog for 1910 (#3357) 2019-10-31 10:08:22 -05:00
Carlos Zamora 444de5b166
Introduce UiaRenderer project (#2930)
As a part of setting up UIA Events, we need to be able to identify WHEN to notify the client. We'll be adopting the RendererEngine model that the VTRenderer and DxRenderer follow to identify when something on the screen is changing and what to alert the automation clients about.

This PR just introduces the UiaRenderer. There's a lot of E_NOTIMPLs and S_FALSEs and a few comments throughout as to my thoughts. This'll make diffing future PRs easier and can make this process more iterative. The code does run with the PR so I plan on merging this into master as normal.
2019-10-28 09:42:54 -07:00
Zoey Riordan 634687bae3 fix latent DPI issues with the WPF control (#3301)
* fix latent DPI issues with the WPF control
2019-10-24 15:45:17 -07:00
Zoey Riordan 566ed8ddbb prevent double handling of tab in wpf control (#3316) 2019-10-24 15:45:04 -07:00
Dustin L. Howett (MSFT) f2a99c56c9
Manipulate Xterm256Engine's extended attr state properly (#3282)
We should be clearing the bits when they're different, not just always
setting them.
This commit also adds a test for extended attributes.

Fixes #3281.
2019-10-24 11:52:36 -07:00
Shashee Hansaja 5ad1deb696 Update README.md (#3284) 2019-10-24 10:41:21 -07:00
Dustin L. Howett (MSFT) d6790c023f Revert two cursor changes that cause crashing and rendering art… (#3292)
Revert "Fix cursor redrawing crash (#2965)"
This reverts commit 926a2e3d80.

Revert "Fix double width cursor for CJK characters (#2932)"
This reverts commit eafa884fc4.

Fixes #3277.
Fully reverts #2965, #2932.
2019-10-22 14:42:57 -07:00