Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
rightbrace opened this issue Jan 15, 2021 · 0 comments
Open

Comments

@rightbrace
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant