https://bugs.kde.org/show_bug.cgi?id=478303
Bug ID: 478303
Summary: Snippet output different when using Tool View and
auto-complete
Classification: Applications
Product: kate
Version: 23.08.3
Platform: openSUSE
OS: Linux
Status: REPORTED
Severity: normal
Priority: NOR
Component: plugin-snippets
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
Created attachment 164039
--> https://bugs.kde.org/attachment.cgi?id=164039&action=edit
C++ debug snippet showing the issue
SUMMARY
When executing snippet plugin using auto-completion, the start of the output is
left out. Using the Tool View with mouse gives full output.
STEPS TO REPRODUCE
1. Add "C++ Debug.xml" snippets to Kate (into
~/.local/share/ktexteditor_snippets/data/ )
2. Restart kate
3. Enable snippets plugin and tool view.
4. Create the following line in a C++ file
5. Use snippet
Snippet outputs
1. With clicking on the Snippets Tool View on the right
std::cout
<< "foo: " << foo
<< "bar: " << bar
<< "baz: " << baz
<< std::endl;
2. Using the auto-completion popup
::cout
<< "foo: " << foo
<< "bar: " << bar
<< "baz: " << baz
<< std::endl;
OBSERVED RESULT
"std::" missing, when triggering the snippet from auto-complete popup.
EXPECTED RESULT
Outputs are the same
SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20231207
KDE Plasma Version: 5.27.10
KDE Frameworks Version: 5.112.0
Qt Version: 5.15.11
Kernel Version: 6.6.3-1-default (64-bit)
Graphics Platform: X11
Processors: 12 × AMD Ryzen 5 3600 6-Core Processor
Memory: 15,5 GiB of RAM
Graphics Processor: AMD Radeon RX 580 Series
Manufacturer: Micro-Star International Co., Ltd.
Product Name: MS-7B79
System Version: 4.0
ADDITIONAL INFORMATION
It seems the auto-complete cuts *three* first characters at the beginning:
Editing the snippet script function cout_selected_vars() by adding characters
at the beginning of
"std::cout" -> "foobarstd::cout"
you get as start of the output
"barstd::cout"
--
You are receiving this mail because:
You are watching all bug changes.