mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2025-09-17 08:28:09 +08:00
Feature: Add multi-line input. (#630)
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
#include <gtest/gtest.h>
|
||||
#include <string> // for allocator
|
||||
#include <string> // for allocator, string
|
||||
|
||||
#include "ftxui/dom/elements.hpp" // for operator|, text, blink, Element
|
||||
#include "ftxui/dom/node.hpp" // for Render
|
||||
#include "ftxui/screen/screen.hpp" // for Screen, Pixel
|
||||
#include "gtest/gtest.h" // for Test, AssertionResult, EXPECT_TRUE, Message, TEST, TestPartResult
|
||||
|
||||
// NOLINTBEGIN
|
||||
namespace ftxui {
|
||||
|
@@ -1,9 +1,9 @@
|
||||
#include <gtest/gtest.h>
|
||||
#include <string> // for allocator
|
||||
#include <string> // for allocator, string
|
||||
|
||||
#include "ftxui/dom/elements.hpp" // for operator|, text, bold, Element
|
||||
#include "ftxui/dom/node.hpp" // for Render
|
||||
#include "ftxui/screen/screen.hpp" // for Screen, Pixel
|
||||
#include "gtest/gtest.h" // for Test, AssertionResult, EXPECT_TRUE, Message, TEST, TestPartResult
|
||||
|
||||
// NOLINTBEGIN
|
||||
namespace ftxui {
|
||||
|
@@ -1,9 +1,9 @@
|
||||
#include <gtest/gtest.h>
|
||||
#include <string> // for allocator
|
||||
#include <string> // for allocator, string
|
||||
|
||||
#include "ftxui/dom/elements.hpp" // for operator|, text, dim, Element
|
||||
#include "ftxui/dom/node.hpp" // for Render
|
||||
#include "ftxui/screen/screen.hpp" // for Screen, Pixel
|
||||
#include "gtest/gtest.h" // for Test, AssertionResult, EXPECT_TRUE, Message, TEST, TestPartResult
|
||||
|
||||
// NOLINTBEGIN
|
||||
namespace ftxui {
|
||||
|
@@ -35,6 +35,9 @@ class Text : public Node {
|
||||
if (x > box_.x_max) {
|
||||
return;
|
||||
}
|
||||
if (cell == "\n") {
|
||||
continue;
|
||||
}
|
||||
screen.PixelAt(x, y).character = cell;
|
||||
++x;
|
||||
}
|
||||
|
@@ -1,9 +1,9 @@
|
||||
#include <gtest/gtest.h>
|
||||
#include <string> // for allocator
|
||||
#include <string> // for allocator, string
|
||||
|
||||
#include "ftxui/dom/elements.hpp" // for operator|, text, underlined, Element
|
||||
#include "ftxui/dom/node.hpp" // for Render
|
||||
#include "ftxui/screen/screen.hpp" // for Screen, Pixel
|
||||
#include "gtest/gtest.h" // for Test, AssertionResult, EXPECT_TRUE, Message, TEST, TestPartResult
|
||||
|
||||
// NOLINTBEGIN
|
||||
namespace ftxui {
|
||||
|
Reference in New Issue
Block a user