D12074: Solve problem of appearance input of interpreter in interpreter's output in Lua backend
Nikita Sirgienko
noreply at phabricator.kde.org
Sun Apr 22 19:56:07 UTC 2018
sirgienko added a comment.
In D12074#252014 <https://phabricator.kde.org/D12074#252014>, @asemke wrote:
> In D12074#251964 <https://phabricator.kde.org/D12074#251964>, @sirgienko wrote:
>
> > Input in outputs maybe appears like '> {input}\n' or '>> {input}\n' or '{input}\n', so this
> >
> > for (const auto input : inputs)
> > output.remove(input + QLatin1Char('\n'));
> >
> >
> > don't catch all input strings in output.
>
>
> The new patch takes care of lua's promts in a better way. Can you give it a try?F5818108: lua_multiline_output_2.patch <https://phabricator.kde.org/F5818108>
Well, it's better, but we still have problems:
F5818122: изображение.png <https://phabricator.kde.org/F5818122>
F5818124: изображение.png <https://phabricator.kde.org/F5818124>
F5818126: изображение.png <https://phabricator.kde.org/F5818126>
(`]]` is a output)
F5818128: изображение.png <https://phabricator.kde.org/F5818128>
F5818130: изображение.png <https://phabricator.kde.org/F5818130>
F5818133: изображение.png <https://phabricator.kde.org/F5818133>
I think, you also should change condition `if(m_currentExpression && !m_output.isEmpty() && m_output.trimmed().endsWith(QLatin1String(">")))` in `luasession.cpp`, because sometimes lua prints `> ` **before** ends work, and as you see, lua backend finishs work with command too early and lua output added to next entries.
REPOSITORY
R55 Cantor
REVISION DETAIL
https://phabricator.kde.org/D12074
To: sirgienko, #cantor, asemke
Cc: #cantor, #kde_edu, narvaez, apol
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-edu/attachments/20180422/4af86313/attachment-0001.html>
More information about the kde-edu
mailing list