<table><tr><td style="">ahmadsamir added inline comments.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D22276">View Revision</a></tr></table><br /><div><strong>INLINE COMMENTS</strong><div><div style="margin: 6px 0 12px 0;"><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D22276#inline-125614">View Inline</a><span style="color: #4b4d51; font-weight: bold;">dhaumann</span> wrote in <span style="color: #4b4d51; font-weight: bold;">katedocument.h:827</span></div>
<div style="margin: 8px 0; padding: 0 12px; color: #74777D;"><p style="padding: 0; margin: 8px;">I dislike the double negation: noIndentation = false. Later even !noIndentation. This is bad API design.</p>

<p style="padding: 0; margin: 8px;">Please change to bool indent = true.</p></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">Noted. Although I'll use an enum per cullmann's recommendation (but I'll choose a better name, hopefully).</p>

<p style="padding: 0; margin: 8px;">(Believe it or not, I had it as "const bool indent" first, but then bike-shed it to an over-engineered death).</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D22276#inline-125703">View Inline</a><span style="color: #4b4d51; font-weight: bold;">cullmann</span> wrote in <span style="color: #4b4d51; font-weight: bold;">kateview.cpp:2881</span></div>
<div style="margin: 8px 0; padding: 0 12px; color: #74777D;"><p style="padding: 0; margin: 8px;">I assume this is just copied from the normal</p>

<p style="padding: 0; margin: 8px;">void KTextEditor::ViewPrivate::keyReturn()<br />
{</p>

<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);">doc()->newLine(this);
m_viewInternal->iconBorder()->updateForCursorLineChange();
m_viewInternal->updateView();</pre></div>

<p style="padding: 0; margin: 8px;">}</p>

<p style="padding: 0; margin: 8px;">;=) In doubt I would just keep this as is and one can think separately if that is needed in both places.</p></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">Correct. My reasoning was, it's exactly like keyReturn(), but with a different newLine() call, (i.e. someone else invented the wheel I just pushed in a different direction, so to speak).</p>

<p style="padding: 0; margin: 8px;">As for updateForCursorLineChange(), digging around in git history I found this[1], so I guess it's needed.</p>

<p style="padding: 0; margin: 8px;">Setting the cursor position and begin/endEdit are handled by DocumentPrivate::newLine().</p>

<p style="padding: 0; margin: 8px;">[1]<a href="https://bugs.kde.org/show_bug.cgi?id=340363" class="remarkup-link" target="_blank" rel="noreferrer">https://bugs.kde.org/show_bug.cgi?id=340363</a></p></div></div></div></div></div><br /><div><strong>REPOSITORY</strong><div><div>R39 KTextEditor</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D22276">https://phabricator.kde.org/D22276</a></div></div><br /><div><strong>To: </strong>ahmadsamir, KTextEditor, cullmann, dhaumann<br /><strong>Cc: </strong>bruns, mickaelbo, kde-frameworks-devel, kwrite-devel, LeGast00n, domson, michaelh, ngraham, demsking, cullmann, sars, dhaumann<br /></div>