Text is being cutted when pasting.
Hello! I'm trying to use your cli which is very nice tool but I'm having a problem. When I'm pasting a text, it is being reduced. For example if I paste CSLAD00000334, the cli return CSLAD0000033. The weird thing is that if I press space, the last character appears. Can anyone help me with this issue?
Hey there,
Where exactly are you pasting the text ? Is it in an input ? If so, which one ? Are you experiencing the same issue if you try pasting something shorter ?
Hello. I'm using this method to generate an input
$result = $menu->askText()
->setPromptText('Enter the number)
->setValidationFailedText('Invalid number')
->setPlaceholderText('#')
->ask();
Temporally, I have modified this file "NonCanonicalReader.php", line 64, to allow up to 30 characters and for the moment it is working...
$char = $this->terminal->read(30);
Thanks for your quick response...
hey @ptykamikaze sorry for the very late reply. This is an interesting problem and I'm not sure what the solution should be. I never considered pasting in to the field when building this. I think the best way to solve this might be to PR a failing test case highlighting the issue and then we can discuss and figure out a solution.
While your solution does work for your use case, any pasted string over 30 chars would still result in trimming.