Download raw body.
ksh vi mode: stop 'P' command from moving the cursor
Hi Walter, Walter Alejandro Iglesias wrote on Tue, Apr 22, 2025 at 08:21:24PM +0200: > I've made it clear on more than one occasion that I'm not an experienced > C programmer. And I'm not part of the acredited team of developers > here, I'm not allowed to modify anything, hence, I don't see how it's > dangerous or aggressive for me I didn't mean "aggressive" as in "a violent person punching others in the face", but merely in the purely technical sense of "a code change that has far-reaching consequences". No offence intended! > to relax given that nothing I say or code > will have any impact. On these bases, I prefer to be eloquent in > explaining the issue I encounter Fair enough! You have definitely found some issues in the past and described them properly such that they could be reproduced and got fixed. Also, often enough bad patches trigger good ones. So what you said already did have some impact. Then again, if the point you want to make is "as a matter of principle, i never test any patch i send", you might want to reconsider because that might discourage people from looking at your patches. >;co Clearly stating how much confidence one has in a patch, and how much testing it received, is usually better than assuming others will infer the quality from the name of the sender. > and let those who are accredited to fix > them do so in the way they see fit. Sure. Then again, almost all those who commit have started by sending patches, so in the end of the day, you are talking about a gradual difference rather than a binary distinction. > In this case it seemed to me helpful to point out this difference in the > behavior of vi(1) and ksh(1), that was the scope of my whole post. True, i hadn't thought about that, and in general terms, it is a perspective worth considering. In the specific context of fixing 'P' for UTF-8, though, i fear it won't help much because cursor positioning for both 'p' and 'P' works completely differently in vi(1) and ksh(1), so none of the available non-intrusive fixes for 'P' is favoured or disfavoured by the comparison with vi(1). > It never occurred to me that the modification I made to your patch was > functional, and I don't even need to refer to the test suite to verify > this, it just seemed to me a practical way to point out the problem. > > What I explained also leaves open analyzing which of the two behaviors > is the most coherent or practical. Perhaps it's worth considering > modifying vi(1). I didn't stop to analyze it, but broadly speaking, I > dare say I'd be happy with either. Changing vi(1) is actually much harder. Not only is it much larger, but so far, it has no UTF-8 support whatsoever. Getting basic UTF-8 support in vi(1) would no doubt be desirable, but nobody got round to that massive task yet. Other vi clones exist that do have UTF-8 support, but the way they do it is so messy and intrusive that there is no consensus among devekopers that we want to head that way. Yours, Ingo
ksh vi mode: stop 'P' command from moving the cursor