Skip to content

Commit

Permalink
runformat
Browse files Browse the repository at this point in the history
  • Loading branch information
zadjii-msft committed Mar 26, 2020
1 parent b5a6de3 commit 47f8591
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 28 deletions.
2 changes: 1 addition & 1 deletion src/cascadia/TerminalApp/TerminalPage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,7 @@ namespace winrt::TerminalApp::implementation
settings.InitialRows(),
settings.InitialCols(),
winrt::guid());
sessionGuid = (GUID)conhostConn.Guid();
sessionGuid = conhostConn.Guid();
connection = conhostConn;
}

Expand Down
4 changes: 1 addition & 3 deletions src/cascadia/TerminalControl/TermControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1189,7 +1189,6 @@ namespace winrt::Microsoft::Terminal::TerminalControl::implementation
const int32_t delta,
const bool isLeftButtonPressed)
{

if (_CanSendVTMouseInput())
{
// TODO this used to be
Expand All @@ -1206,7 +1205,7 @@ namespace winrt::Microsoft::Terminal::TerminalControl::implementation
const auto ctrlPressed = WI_IsFlagSet(static_cast<uint32_t>(modifiers),
static_cast<uint32_t>(VirtualKeyModifiers::Control));
const auto shiftPressed = WI_IsFlagSet(static_cast<uint32_t>(modifiers),
static_cast<uint32_t>(VirtualKeyModifiers::Shift));
static_cast<uint32_t>(VirtualKeyModifiers::Shift));

if (ctrlPressed && shiftPressed)
{
Expand All @@ -1223,7 +1222,6 @@ namespace winrt::Microsoft::Terminal::TerminalControl::implementation
return false;
}


// Method Description:
// - This is part of the solution to GH#979
// - Manually handle a scrolling event. This is used to help support
Expand Down
1 change: 0 additions & 1 deletion src/cascadia/TerminalControl/TermControl.h
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,6 @@ namespace winrt::Microsoft::Terminal::TerminalControl::implementation
void _Search(const winrt::hstring& text, const bool goForward, const bool caseSensitive);
void _CloseSearchBoxControl(const winrt::Windows::Foundation::IInspectable& sender, Windows::UI::Xaml::RoutedEventArgs const& args);


// TSFInputControl Handlers
void _CompositionCompleted(winrt::hstring text);
void _CurrentCursorPositionHandler(const IInspectable& sender, const CursorPositionEventArgs& eventArgs);
Expand Down
3 changes: 1 addition & 2 deletions src/cascadia/WindowsTerminal/AppHost.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ using namespace winrt::Windows::Foundation::Numerics;
using namespace ::Microsoft::Console;
using namespace ::Microsoft::Console::Types;


AppHost::AppHost() noexcept :
_app{},
_logic{ nullptr }, // don't make one, we're going to take a ref on app's
Expand Down Expand Up @@ -52,7 +51,7 @@ AppHost::AppHost() noexcept :
_logic,
std::placeholders::_1,
std::placeholders::_2));
_window->MouseScrolled({ this, &AppHost::_WindowMouseWheeled});
_window->MouseScrolled({ this, &AppHost::_WindowMouseWheeled });
_window->MakeWindow();
}

Expand Down
19 changes: 1 addition & 18 deletions src/cascadia/WindowsTerminal/IslandWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -264,21 +264,6 @@ void IslandWindow::OnSize(const UINT width, const UINT height)
}
}

struct MyMsg {
UINT message;
WPARAM wparam;
LPARAM lparam;
};

BOOL CALLBACK okay(HWND child, LPARAM lp)
{
MyMsg m = *((MyMsg*)lp);
PostMessage(child, m.message, m.wparam, m.lparam);

return true;

}

[[nodiscard]] LRESULT IslandWindow::MessageHandler(UINT const message, WPARAM const wparam, LPARAM const lparam) noexcept
{
switch (message)
Expand Down Expand Up @@ -359,7 +344,7 @@ BOOL CALLBACK okay(HWND child, LPARAM lp)
// incorrect results on systems with multiple monitors. Systems with
// multiple monitors can have negative x- and y- coordinates, and LOWORD
// and HIWORD treat the coordinates as unsigned quantities.
const til::point eventPoint{GET_X_LPARAM(lparam), GET_Y_LPARAM(lparam)};
const til::point eventPoint{ GET_X_LPARAM(lparam), GET_Y_LPARAM(lparam) };
// This mouse event is relative to the display origin, not the window. Convert here.
const til::rectangle windowRect{ GetWindowRect() };
const auto origin = windowRect.origin();
Expand All @@ -375,8 +360,6 @@ BOOL CALLBACK okay(HWND child, LPARAM lp)
}
}



// TODO: handle messages here...
return base_type::MessageHandler(message, wparam, lparam);
}
Expand Down
5 changes: 2 additions & 3 deletions src/til/ut_til/PointTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -444,13 +444,12 @@ class PointTests
// All ptrdiff_ts fit into a float, so there's no exception tests.
}


TEST_METHOD(Scaling)
{
Log::Comment(L"0.) Multiplication of two things that should be in bounds.");
{
const til::point pt{ 5, 10 };
const int scale = 23 ;
const int scale = 23;

const til::point expected{ pt.x() * scale, pt.y() * scale };

Expand Down Expand Up @@ -486,7 +485,7 @@ class PointTests
Log::Comment(L"3.) Division of two things that should be in bounds.");
{
const til::point pt{ 555, 510 };
const int scale = 23 ;
const int scale = 23;

const til::point expected{ pt.x() / scale, pt.y() / scale };

Expand Down

1 comment on commit 47f8591

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New misspellings found, please review:

  • IMouse
  • recieved
  • touchpad
  • trackpad
To accept these changes, run the following commands
remove_obsolete_words=$(mktemp)
echo '#!/usr/bin/perl -ni
my $re=join "|", qw(
Impl
trackpads
);
next if /^($re)(?:$| .*)/;
print;' > $remove_obsolete_words
chmod +x $remove_obsolete_words
for file in .github/actions/spell-check/whitelist/alphabet.txt .github/actions/spell-check/whitelist/web.txt .github/actions/spell-check/whitelist/whitelist.txt; do $remove_obsolete_words $file; done
rm $remove_obsolete_words
(
echo "
IMouse
impl
recieved
touchpad
trackpad
"
) | sort -u -f | perl -ne 'next unless /./; print' > new_whitelist.txt && mv new_whitelist.txt '.github/actions/spell-check/whitelist/47f859141244d8af4a00202cf2f3de4a5e6af580.txt'

Please sign in to comment.