Skip to content

windowWidth and windowHeight do not update on window resize (linux) #30

Description

@rightbrace

Like the title says, the fields console.windowWidth and console.windowHeight work correctly, but do not update after a window resize. Here's an example:

import 'package:dart_console/dart_console.dart';
import 'dart:io';

void main() {
  final console = Console();
  while (true) {
    var key = console.readKey();
    if (key.char == 'q') {
      break;
    } else {
      // Press some keys, resize the window, press some more keys
      stdout.writeln('${console.windowWidth}x${console.windowHeight}'); // Does not update
      stdout.writeln('${stdout.terminalColumns}x${stdout.terminalLines}'); // Updates
    }
  }
}

This was observed in gnome-terminal and vscode's integrated terminal.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions