Skip to content

v1.6.1

Choose a tag to compare

@bestK bestK released this 11 Jun 07:04

New Features

  • sys.set_bar_text() / sys.set_bar_lua(): WebView can now update bar display with plain text or rich Lua expressions
  • WebView lua_path binding: Each WebView knows its owner script, bridge callbacks target the correct bar
  • Dialog size persistence: All dialogs save position AND size on close, restore on next open
  • K-Line Demo: kline_demo.lua — BTC/USDT candlestick chart via WebView2 + lightweight-charts, real-time WebSocket updates

Improvements

  • WebView creation deferred via PostMessage to prevent stack overflow from recursive WM_PAINT
  • webview_creating guard prevents duplicate creation attempts
  • Stack size increased to 8MB as safety margin for WebView2 initialization
  • set_bar_lua uses direct return expr instead of function wrapper (fixes syntax error with .. operator)
  • __bar_lua global persists last bar expression across script re-execution
  • Dialog position/size saved for all dialogs (removed borderless-only restriction)

Bug Fixes

  • Fix WebView2 stack overflow crash (0xC00000FD) when opening webview dialogs
  • Fix set_bar_lua incorrectly wrapping expressions in function()...end()
  • Fix webview bridge callbacks affecting wrong bar (global lua_path race condition)

Full Changelog: v1.6.0...v1.6.1