pw_console: Enable repl output line wrapping

- Fix mouse wheel scrolling with output buffer line wrapping
  enabled. Previously this would get stuck half way up or so if line
  wrapping was enabled. This case isn't handled correctly for
  arbitrary content due to:
  https://github.com/prompt-toolkit/python-prompt-toolkit/blob/e9eac2eb59ec385e81742fa2ac623d4b8de00925/prompt_toolkit/layout/containers.py#L2599
  For our use case the content is a prompt_toolkit Buffer so we can
  ignore that condition.

- Add Python Results toolbar button to toggle line wrapping.

- Fix glitch in toolbar titles being overwritten, Python Results
  toolbar was being shown as Python Repl.

Manual Test: Python Input & Output all steps

Change-Id: I27e0be5a4d9042d0912cab6e1c9bf694869781a0
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/74760
Reviewed-by: Keir Mierle <keir@google.com>
Commit-Queue: Anthony DiGirolamo <tonymd@google.com>
5 files changed
tree: 1d3a3973ec2df46c8e7bdbf651e4b11a622928ac
  1. build_overrides/
  2. docker/
  3. docs/
  4. pw_allocator/
  5. pw_analog/
  6. pw_android_toolchain/
  7. pw_arduino_build/
  8. pw_assert/
  9. pw_assert_basic/
  10. pw_assert_log/
  11. pw_base64/
  12. pw_bloat/
  13. pw_blob_store/
  14. pw_bluetooth_hci/
  15. pw_boot/
  16. pw_boot_cortex_m/
  17. pw_build/
  18. pw_build_info/
  19. pw_build_mcuxpresso/
  20. pw_bytes/
  21. pw_checksum/
  22. pw_chrono/
  23. pw_chrono_embos/
  24. pw_chrono_freertos/
  25. pw_chrono_stl/
  26. pw_chrono_threadx/
  27. pw_cli/
  28. pw_console/
  29. pw_containers/
  30. pw_cpu_exception/
  31. pw_cpu_exception_cortex_m/
  32. pw_crypto/
  33. pw_docgen/
  34. pw_doctor/
  35. pw_env_setup/
  36. pw_file/
  37. pw_function/
  38. pw_fuzzer/
  39. pw_hdlc/
  40. pw_hex_dump/
  41. pw_i2c/
  42. pw_interrupt/
  43. pw_interrupt_cortex_m/
  44. pw_kvs/
  45. pw_libc/
  46. pw_log/
  47. pw_log_basic/
  48. pw_log_null/
  49. pw_log_rpc/
  50. pw_log_tokenized/
  51. pw_malloc/
  52. pw_malloc_freelist/
  53. pw_metric/
  54. pw_minimal_cpp_stdlib/
  55. pw_module/
  56. pw_multisink/
  57. pw_package/
  58. pw_persistent_ram/
  59. pw_polyfill/
  60. pw_preprocessor/
  61. pw_presubmit/
  62. pw_protobuf/
  63. pw_protobuf_compiler/
  64. pw_random/
  65. pw_result/
  66. pw_ring_buffer/
  67. pw_router/
  68. pw_rpc/
  69. pw_snapshot/
  70. pw_software_update/
  71. pw_span/
  72. pw_spi/
  73. pw_status/
  74. pw_stm32cube_build/
  75. pw_stream/
  76. pw_string/
  77. pw_symbolizer/
  78. pw_sync/
  79. pw_sync_baremetal/
  80. pw_sync_embos/
  81. pw_sync_freertos/
  82. pw_sync_stl/
  83. pw_sync_threadx/
  84. pw_sys_io/
  85. pw_sys_io_arduino/
  86. pw_sys_io_baremetal_lm3s6965evb/
  87. pw_sys_io_baremetal_stm32f429/
  88. pw_sys_io_mcuxpresso/
  89. pw_sys_io_stdio/
  90. pw_sys_io_stm32cube/
  91. pw_system/
  92. pw_target_runner/
  93. pw_thread/
  94. pw_thread_embos/
  95. pw_thread_freertos/
  96. pw_thread_stl/
  97. pw_thread_threadx/
  98. pw_tls_client/
  99. pw_tls_client_boringssl/
  100. pw_tls_client_mbedtls/
  101. pw_tokenizer/
  102. pw_tool/
  103. pw_toolchain/
  104. pw_trace/
  105. pw_trace_tokenized/
  106. pw_transfer/
  107. pw_unit_test/
  108. pw_varint/
  109. pw_watch/
  110. pw_web_ui/
  111. pw_work_queue/
  112. targets/
  113. third_party/
  114. .bazelignore
  115. .bazelrc
  116. .clang-format
  117. .clang-tidy
  118. .eslintrc.json
  119. .gitattributes
  120. .gitignore
  121. .gn
  122. .prettierrc.js
  123. .pylintrc
  124. activate.bat
  125. Android.bp
  126. AUTHORS
  127. bootstrap.bat
  128. bootstrap.sh
  129. BUILD.bazel
  130. BUILD.gn
  131. BUILDCONFIG.gn
  132. CMakeLists.txt
  133. LICENSE
  134. modules.gni
  135. OWNERS
  136. package.json
  137. PW_PLUGINS
  138. README.md
  139. tsconfig.json
  140. WORKSPACE
  141. yarn.lock
README.md

Pigweed

Pigweed is an open source collection of embedded-targeted libraries–or as we like to call them, modules. These modules are building blocks and infrastructure that enable faster and more reliable development on small-footprint MMU-less 32-bit microcontrollers like the STMicroelectronics STM32L452 or the Nordic nRF52832.

For more information please see our website: https://pigweed.dev/

Links