Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions source/dcell/common.d
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
module dcell.common;

import dcell.screen;
import dcell.ttyscreen;
import dcell.vt;

/**
* Obtain a new screen. On POSIX this is connected to /dev/tty
* using the $TERM environment variable.
*/
Screen newScreen()
{
return new TtyScreen();
return new VtScreen();
}
8 changes: 4 additions & 4 deletions source/dcell/ttyscreen.d → source/dcell/vt.d
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* TtyScreen module implements VT style terminals (ala XTerm).
* VtScreen module implements VT style terminals (ala XTerm).
* These are terminals that work by sending escape sequences over
* a single byte stream. Historically this would be a serial port,
* but modern systems likely use SSH, or a pty (pseudo-terminal).
Expand All @@ -12,7 +12,7 @@
* (See accompanying file LICENSE or https://www.boost.org/LICENSE_1_0.txt)
* SPDX-License-Identifier: BSL-1.0
*/
module dcell.ttyscreen;
module dcell.vt;

package:

Expand All @@ -38,7 +38,7 @@ import dcell.event;
import dcell.parser;
import dcell.tty;

class TtyScreen : Screen
class VtScreen : Screen
{
// Various escape escape sequences we can send.
// Note that we have a rather broad assumption that we only support terminals
Expand Down Expand Up @@ -711,7 +711,7 @@ private:
case Attr.plainUnderline:
puts(vt.underline);
break;
case attr.doubleUnderline:
case Attr.doubleUnderline:
puts(vt.underline);
puts(vt.doubleUnder);
break;
Expand Down