Skip to content

Commit

Permalink
Fix double width cursor for CJK characters (#2932)
Browse files Browse the repository at this point in the history
  • Loading branch information
skyline75489 authored and zadjii-msft committed Sep 27, 2019
1 parent 86c9e58 commit eafa884
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/cascadia/TerminalCore/Terminal.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include "../../terminal/input/terminalInput.hpp"

#include "../../types/inc/Viewport.hpp"
#include "../../types/inc/GlyphWidth.hpp"
#include "../../types/IUiaData.h"
#include "../../cascadia/terminalcore/ITerminalApi.hpp"
#include "../../cascadia/terminalcore/ITerminalInput.hpp"
Expand Down
4 changes: 3 additions & 1 deletion src/cascadia/TerminalCore/terminalrenderdata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@ COLORREF Terminal::GetCursorColor() const noexcept

bool Terminal::IsCursorDoubleWidth() const noexcept
{
return false;
const auto position = _buffer->GetCursor().GetPosition();
TextBufferTextIterator it(TextBufferCellIterator(*_buffer, position));
return IsGlyphFullWidth(*it);
}

const std::vector<RenderOverlay> Terminal::GetOverlays() const noexcept
Expand Down

0 comments on commit eafa884

Please sign in to comment.